From 3e7cd682f49bbdf53a918e5d178991a781951bf6 Mon Sep 17 00:00:00 2001 From: juhosg Date: Sun, 5 Oct 2008 13:08:12 +0000 Subject: [PATCH] [kernel] make gpio_dev compatible with GPIOLIB & GPIO_SYSFS (closes #4016) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12864 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../linux/generic-2.6/files-2.6.25/drivers/char/gpio_dev.c | 6 +++--- .../linux/generic-2.6/files-2.6.26/drivers/char/gpio_dev.c | 6 +++--- .../linux/generic-2.6/files-2.6.27/drivers/char/gpio_dev.c | 6 +++--- target/linux/generic-2.6/files/drivers/char/gpio_dev.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/target/linux/generic-2.6/files-2.6.25/drivers/char/gpio_dev.c b/target/linux/generic-2.6/files-2.6.25/drivers/char/gpio_dev.c index 48ef76f8a..4dc637471 100644 --- a/target/linux/generic-2.6/files-2.6.25/drivers/char/gpio_dev.c +++ b/target/linux/generic-2.6/files-2.6.25/drivers/char/gpio_dev.c @@ -37,7 +37,7 @@ static int dev_major; static unsigned int gpio_access_mask; -static struct class *gpio_class; +static struct class *gpiodev_class; /* Counter is 1, if the device is not opened and zero (or less) if opened. */ static atomic_t gpio_open_cnt = ATOMIC_INIT(1); @@ -141,8 +141,8 @@ gpio_probe(struct platform_device *dev) goto out; } - gpio_class = class_create(THIS_MODULE, DEVNAME); - class_device_create(gpio_class, NULL, MKDEV(dev_major, 0), NULL, DEVNAME); + gpiodev_class = class_create(THIS_MODULE, DRVNAME); + class_device_create(gpiodev_class, NULL, MKDEV(dev_major, 0), NULL, DEVNAME); printk(KERN_INFO DRVNAME ": gpio device registered with major %d\n", dev_major); diff --git a/target/linux/generic-2.6/files-2.6.26/drivers/char/gpio_dev.c b/target/linux/generic-2.6/files-2.6.26/drivers/char/gpio_dev.c index b09ebeffa..b82d2f13e 100644 --- a/target/linux/generic-2.6/files-2.6.26/drivers/char/gpio_dev.c +++ b/target/linux/generic-2.6/files-2.6.26/drivers/char/gpio_dev.c @@ -37,7 +37,7 @@ static int dev_major; static unsigned int gpio_access_mask; -static struct class *gpio_class; +static struct class *gpiodev_class; /* Counter is 1, if the device is not opened and zero (or less) if opened. */ static atomic_t gpio_open_cnt = ATOMIC_INIT(1); @@ -141,8 +141,8 @@ gpio_probe(struct platform_device *dev) goto out; } - gpio_class = class_create(THIS_MODULE, DEVNAME); - device_create(gpio_class, NULL, MKDEV(dev_major, 0), DEVNAME); + gpiodev_class = class_create(THIS_MODULE, DRVNAME); + device_create(gpiodev_class, NULL, MKDEV(dev_major, 0), DEVNAME); printk(KERN_INFO DRVNAME ": gpio device registered with major %d\n", dev_major); diff --git a/target/linux/generic-2.6/files-2.6.27/drivers/char/gpio_dev.c b/target/linux/generic-2.6/files-2.6.27/drivers/char/gpio_dev.c index 3fbf3a58c..8392fcf2d 100644 --- a/target/linux/generic-2.6/files-2.6.27/drivers/char/gpio_dev.c +++ b/target/linux/generic-2.6/files-2.6.27/drivers/char/gpio_dev.c @@ -37,7 +37,7 @@ static int dev_major; static unsigned int gpio_access_mask; -static struct class *gpio_class; +static struct class *gpiodev_class; /* Counter is 1, if the device is not opened and zero (or less) if opened. */ static atomic_t gpio_open_cnt = ATOMIC_INIT(1); @@ -141,8 +141,8 @@ gpio_probe(struct platform_device *dev) goto out; } - gpio_class = class_create(THIS_MODULE, DEVNAME); - device_create(gpio_class, NULL, MKDEV(dev_major, 0), dev, DEVNAME); + gpiodev_class = class_create(THIS_MODULE, DRVNAME); + device_create(gpiodev_class, NULL, MKDEV(dev_major, 0), dev, DEVNAME); printk(KERN_INFO DRVNAME ": gpio device registered with major %d\n", dev_major); diff --git a/target/linux/generic-2.6/files/drivers/char/gpio_dev.c b/target/linux/generic-2.6/files/drivers/char/gpio_dev.c index 48ef76f8a..4dc637471 100644 --- a/target/linux/generic-2.6/files/drivers/char/gpio_dev.c +++ b/target/linux/generic-2.6/files/drivers/char/gpio_dev.c @@ -37,7 +37,7 @@ static int dev_major; static unsigned int gpio_access_mask; -static struct class *gpio_class; +static struct class *gpiodev_class; /* Counter is 1, if the device is not opened and zero (or less) if opened. */ static atomic_t gpio_open_cnt = ATOMIC_INIT(1); @@ -141,8 +141,8 @@ gpio_probe(struct platform_device *dev) goto out; } - gpio_class = class_create(THIS_MODULE, DEVNAME); - class_device_create(gpio_class, NULL, MKDEV(dev_major, 0), NULL, DEVNAME); + gpiodev_class = class_create(THIS_MODULE, DRVNAME); + class_device_create(gpiodev_class, NULL, MKDEV(dev_major, 0), NULL, DEVNAME); printk(KERN_INFO DRVNAME ": gpio device registered with major %d\n", dev_major); -- 2.35.1