From 59a2e980031f9527f1d5174b032b2c1adfd9cc50 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 15 Aug 2005 04:26:31 -0700 Subject: [PATCH] ARM: OMAP: Fixed device_attribute for gpio-switch Fixed device_attribute for gpio-switch --- arch/arm/plat-omap/gpio-switch.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/gpio-switch.c b/arch/arm/plat-omap/gpio-switch.c index 57a211c57ff..787e88d8ce4 100644 --- a/arch/arm/plat-omap/gpio-switch.c +++ b/arch/arm/plat-omap/gpio-switch.c @@ -80,7 +80,10 @@ 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 +92,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)]); \ -- 2.41.1