From: Paul Mundt Date: Wed, 8 Feb 2006 16:03:17 +0000 (+0200) Subject: cbus: Update tahvo-usb for kernel API changes. X-Git-Tag: v2.6.16-omap1~96 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c604ff0bb1bbd3c6bf14bb9e5cae67c5a89e4ece;p=linux-2.6-omap-h63xx.git cbus: Update tahvo-usb for kernel API changes. --- diff --git a/drivers/cbus/tahvo-usb.c b/drivers/cbus/tahvo-usb.c index a7d36797cb3..a002fb71585 100644 --- a/drivers/cbus/tahvo-usb.c +++ b/drivers/cbus/tahvo-usb.c @@ -29,14 +29,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include @@ -212,7 +212,8 @@ struct device_driver omap_otg_driver = { * which are copied from isp1301.c * --------------------------------------------------------------------------- */ -static ssize_t vbus_state_show(struct device *device, char *buf) +static ssize_t vbus_state_show(struct device *device, + struct device_attribute *attr, char *buf) { struct tahvo_usb *tu = (struct tahvo_usb*) device->driver_data; return sprintf(buf, "%d\n", tu->vbus_state); @@ -272,11 +273,8 @@ static void check_vbus_state(struct tahvo_usb *tu) prev_state = tu->vbus_state; tu->vbus_state = reg & 0x01; - if (prev_state != tu->vbus_state) { - kobject_uevent_atomic(&tu->pt_dev->dev.kobj, - KOBJ_CHANGE, - &dev_attr_vbus_state.attr); - } + if (prev_state != tu->vbus_state) + kobject_uevent(&tu->pt_dev->dev.kobj, KOBJ_CHANGE); } static void tahvo_usb_become_host(struct tahvo_usb *tu) @@ -494,7 +492,8 @@ static void tahvo_usb_vbus_interrupt(unsigned long arg) } #ifdef CONFIG_USB_OTG -static ssize_t otg_mode_show(struct device *device, char *buf) +static ssize_t otg_mode_show(struct device *device, + struct device_attribute *attr, char *buf) { struct tahvo_usb *tu = (struct tahvo_usb*) device->driver_data; switch (tu->tahvo_mode) { @@ -506,7 +505,9 @@ static ssize_t otg_mode_show(struct device *device, char *buf) return sprintf(buf, "unknown\n"); } -static ssize_t otg_mode_store(struct device *device, const char *buf, size_t count) +static ssize_t otg_mode_store(struct device *device, + struct device_attribute *attr, + const char *buf, size_t count) { struct tahvo_usb *tu = (struct tahvo_usb*) device->driver_data; int r;