attached is a cut-down patch that attempts to convert scx200_gpio
to use the new 2.6 char-dev-driver API.
Its closely modelled after LDD-3 scull driver.
it segfaults reliably on cat /proc/devices after rmmod'g
tested against 12-rc4-mm2, I think it will apply to 12-rc[45]
#!/bin/bash
# load 1 at a time ??
modprobe scx200
modprobe scx200_gpio
cat /proc/devices
rmmod scx200_gpio
cat /proc/devices # 1st segfault here
rmmod scx200
cat /proc/devices # segfault again here
I can hazard a few (blind) guesses as to the reasons for segfault:
1. Im doing it wrong (I did check for the obvious, but..)
2. this is a mixed conversion
scx200_gpio depends upon scx200, which is still old api, I havent
touched it.
tia
jimc