diff options
-rw-r--r-- | arch/i386/kernel/scx200.c | 7 | ||||
-rw-r--r-- | drivers/char/scx200_gpio.c | 26 | ||||
-rw-r--r-- | include/linux/scx200.h | 7 | ||||
-rw-r--r-- | include/linux/scx200_gpio.h | 7 |
4 files changed, 9 insertions, 38 deletions
diff --git a/arch/i386/kernel/scx200.c b/arch/i386/kernel/scx200.c index 321f5fd26e75..4d3d8e811fe1 100644 --- a/arch/i386/kernel/scx200.c +++ b/arch/i386/kernel/scx200.c | |||
@@ -159,10 +159,3 @@ EXPORT_SYMBOL(scx200_gpio_base); | |||
159 | EXPORT_SYMBOL(scx200_gpio_shadow); | 159 | EXPORT_SYMBOL(scx200_gpio_shadow); |
160 | EXPORT_SYMBOL(scx200_gpio_configure); | 160 | EXPORT_SYMBOL(scx200_gpio_configure); |
161 | EXPORT_SYMBOL(scx200_cb_base); | 161 | EXPORT_SYMBOL(scx200_cb_base); |
162 | |||
163 | /* | ||
164 | Local variables: | ||
165 | compile-command: "make -k -C ../../.. SUBDIRS=arch/i386/kernel modules" | ||
166 | c-basic-offset: 8 | ||
167 | End: | ||
168 | */ | ||
diff --git a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c index 664a6e97eb1a..dd051ea6755e 100644 --- a/drivers/char/scx200_gpio.c +++ b/drivers/char/scx200_gpio.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/drivers/char/scx200_gpio.c | 1 | /* linux/drivers/char/scx200_gpio.c |
2 | 2 | ||
3 | National Semiconductor SCx200 GPIO driver. Allows a user space | 3 | National Semiconductor SCx200 GPIO driver. Allows a user space |
4 | process to play with the GPIO pins. | 4 | process to play with the GPIO pins. |
@@ -26,7 +26,7 @@ static int major = 0; /* default to dynamic major */ | |||
26 | module_param(major, int, 0); | 26 | module_param(major, int, 0); |
27 | MODULE_PARM_DESC(major, "Major device number"); | 27 | MODULE_PARM_DESC(major, "Major device number"); |
28 | 28 | ||
29 | static ssize_t scx200_gpio_write(struct file *file, const char __user *data, | 29 | static ssize_t scx200_gpio_write(struct file *file, const char __user *data, |
30 | size_t len, loff_t *ppos) | 30 | size_t len, loff_t *ppos) |
31 | { | 31 | { |
32 | unsigned m = iminor(file->f_dentry->d_inode); | 32 | unsigned m = iminor(file->f_dentry->d_inode); |
@@ -34,15 +34,14 @@ static ssize_t scx200_gpio_write(struct file *file, const char __user *data, | |||
34 | 34 | ||
35 | for (i = 0; i < len; ++i) { | 35 | for (i = 0; i < len; ++i) { |
36 | char c; | 36 | char c; |
37 | if (get_user(c, data+i)) | 37 | if (get_user(c, data + i)) |
38 | return -EFAULT; | 38 | return -EFAULT; |
39 | switch (c) | 39 | switch (c) { |
40 | { | 40 | case '0': |
41 | case '0': | 41 | scx200_gpio_set(m, 0); |
42 | scx200_gpio_set(m, 0); | ||
43 | break; | 42 | break; |
44 | case '1': | 43 | case '1': |
45 | scx200_gpio_set(m, 1); | 44 | scx200_gpio_set(m, 1); |
46 | break; | 45 | break; |
47 | case 'O': | 46 | case 'O': |
48 | printk(KERN_INFO NAME ": GPIO%d output enabled\n", m); | 47 | printk(KERN_INFO NAME ": GPIO%d output enabled\n", m); |
@@ -83,7 +82,7 @@ static ssize_t scx200_gpio_read(struct file *file, char __user *buf, | |||
83 | value = scx200_gpio_get(m); | 82 | value = scx200_gpio_get(m); |
84 | if (put_user(value ? '1' : '0', buf)) | 83 | if (put_user(value ? '1' : '0', buf)) |
85 | return -EFAULT; | 84 | return -EFAULT; |
86 | 85 | ||
87 | return 1; | 86 | return 1; |
88 | } | 87 | } |
89 | 88 | ||
@@ -140,10 +139,3 @@ static void __exit scx200_gpio_cleanup(void) | |||
140 | 139 | ||
141 | module_init(scx200_gpio_init); | 140 | module_init(scx200_gpio_init); |
142 | module_exit(scx200_gpio_cleanup); | 141 | module_exit(scx200_gpio_cleanup); |
143 | |||
144 | /* | ||
145 | Local variables: | ||
146 | compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules" | ||
147 | c-basic-offset: 8 | ||
148 | End: | ||
149 | */ | ||
diff --git a/include/linux/scx200.h b/include/linux/scx200.h index a22f9e173ad2..693c0557e70b 100644 --- a/include/linux/scx200.h +++ b/include/linux/scx200.h | |||
@@ -49,10 +49,3 @@ extern unsigned scx200_cb_base; | |||
49 | #define SCx200_REV 0x3d /* Revision Register */ | 49 | #define SCx200_REV 0x3d /* Revision Register */ |
50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ | 50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ |
51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ | 51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ |
52 | |||
53 | /* | ||
54 | Local variables: | ||
55 | compile-command: "make -C ../.. bzImage modules" | ||
56 | c-basic-offset: 8 | ||
57 | End: | ||
58 | */ | ||
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 30cdd648ba79..83ab8a1521f5 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -87,10 +87,3 @@ static inline void scx200_gpio_change(int index) { | |||
87 | #undef __SCx200_GPIO_SHADOW | 87 | #undef __SCx200_GPIO_SHADOW |
88 | #undef __SCx200_GPIO_INDEX | 88 | #undef __SCx200_GPIO_INDEX |
89 | #undef __SCx200_GPIO_OUT | 89 | #undef __SCx200_GPIO_OUT |
90 | |||
91 | /* | ||
92 | Local variables: | ||
93 | compile-command: "make -C ../.. bzImage modules" | ||
94 | c-basic-offset: 8 | ||
95 | End: | ||
96 | */ | ||