Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30769
b: refs/heads/master
c: 62c83cd
h: refs/heads/master
i:
  30767: 39c0a83
v: v3
  • Loading branch information
Jim Cromie authored and Linus Torvalds committed Jun 28, 2006
1 parent 35a786b commit 4c9f9df
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a67e4c5b6faaccf31740a07d93704166405d880
refs/heads/master: 62c83cde9282a9580994a12b3063e677181b5ebe
7 changes: 0 additions & 7 deletions trunk/arch/i386/kernel/scx200.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,3 @@ EXPORT_SYMBOL(scx200_gpio_base);
EXPORT_SYMBOL(scx200_gpio_shadow);
EXPORT_SYMBOL(scx200_gpio_configure);
EXPORT_SYMBOL(scx200_cb_base);

/*
Local variables:
compile-command: "make -k -C ../../.. SUBDIRS=arch/i386/kernel modules"
c-basic-offset: 8
End:
*/
26 changes: 9 additions & 17 deletions trunk/drivers/char/scx200_gpio.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* linux/drivers/char/scx200_gpio.c
/* linux/drivers/char/scx200_gpio.c
National Semiconductor SCx200 GPIO driver. Allows a user space
process to play with the GPIO pins.
Expand Down Expand Up @@ -26,23 +26,22 @@ static int major = 0; /* default to dynamic major */
module_param(major, int, 0);
MODULE_PARM_DESC(major, "Major device number");

static ssize_t scx200_gpio_write(struct file *file, const char __user *data,
static ssize_t scx200_gpio_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
{
unsigned m = iminor(file->f_dentry->d_inode);
size_t i;

for (i = 0; i < len; ++i) {
char c;
if (get_user(c, data+i))
if (get_user(c, data + i))
return -EFAULT;
switch (c)
{
case '0':
scx200_gpio_set(m, 0);
switch (c) {
case '0':
scx200_gpio_set(m, 0);
break;
case '1':
scx200_gpio_set(m, 1);
case '1':
scx200_gpio_set(m, 1);
break;
case 'O':
printk(KERN_INFO NAME ": GPIO%d output enabled\n", m);
Expand Down Expand Up @@ -83,7 +82,7 @@ static ssize_t scx200_gpio_read(struct file *file, char __user *buf,
value = scx200_gpio_get(m);
if (put_user(value ? '1' : '0', buf))
return -EFAULT;

return 1;
}

Expand Down Expand Up @@ -140,10 +139,3 @@ static void __exit scx200_gpio_cleanup(void)

module_init(scx200_gpio_init);
module_exit(scx200_gpio_cleanup);

/*
Local variables:
compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules"
c-basic-offset: 8
End:
*/
7 changes: 0 additions & 7 deletions trunk/include/linux/scx200.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,3 @@ extern unsigned scx200_cb_base;
#define SCx200_REV 0x3d /* Revision Register */
#define SCx200_CBA 0x3e /* Configuration Base Address Register */
#define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */

/*
Local variables:
compile-command: "make -C ../.. bzImage modules"
c-basic-offset: 8
End:
*/
7 changes: 0 additions & 7 deletions trunk/include/linux/scx200_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,3 @@ static inline void scx200_gpio_change(int index) {
#undef __SCx200_GPIO_SHADOW
#undef __SCx200_GPIO_INDEX
#undef __SCx200_GPIO_OUT

/*
Local variables:
compile-command: "make -C ../.. bzImage modules"
c-basic-offset: 8
End:
*/

0 comments on commit 4c9f9df

Please sign in to comment.