]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ARM: OMAP: Update gpio_switch
authorJuha Yrjola <juha.yrjola@nokia.com>
Thu, 11 Aug 2005 13:54:37 +0000 (06:54 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 11 Aug 2005 13:54:37 +0000 (06:54 -0700)
Update gpio_switch

arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/gpio-switch.c

index f2a69af1883368941a5e906a2ba83786f80d9833..07f4613c48c9b35156c97d2daf079c1e11102f10 100644 (file)
@@ -50,10 +50,10 @@ config OMAP_BOOT_REASON
 
 config OMAP_GPIO_SWITCH
        bool "GPIO switch support"
-        depends on OMAP_BOOT_TAG
+        depends on OMAP_BOOT_TAG && PROC_FS
         default n
         help
-          Say Y, if you want to have support for input layer reporting
+          Say Y, if you want to have support for kevent reporting
           of GPIO switches (e.g. cover switches). Your bootloader has to
           provide information about the switches to the kernel via the
           ATAG_BOARD mechanism.
index 196073e81466e076708a6c6553034e23bba81da8..d4384a3d1b00bac69beadee0dafa2285766f8db1 100644 (file)
@@ -80,7 +80,9 @@ static int gpio_sw_get_state(struct gpio_switch *sw)
        return state;
 }
 
-static ssize_t gpio_sw_store(struct device *dev, const char *buf, size_t count)
+static ssize_t gpio_sw_store(struct device *dev,
+                            struct device_attribute *attr,
+                            const char *buf, size_t count)
 {
        struct gpio_switch *sw = dev_get_drvdata(dev);
        int enable = (int)simple_strtoul(buf, NULL, 10);
@@ -89,7 +91,9 @@ static ssize_t gpio_sw_store(struct device *dev, const char *buf, size_t count)
 }
 
 #define gpio_sw_switch_attr(name)                                      \
-static ssize_t gpio_sw_show_##name(struct device *dev, char *buf)      \
+static ssize_t gpio_sw_show_##name(struct device *dev,                 \
+                               struct device_attribute *attr,          \
+                               char *buf)                              \
 {                                                                      \
        struct gpio_switch *sw = dev_get_drvdata(dev);                  \
        return sprintf(buf, "%s\n", name##_str[gpio_sw_get_state(sw)]); \