diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /drivers/usb | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/atm/usbatm.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 18 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-dbg.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-dbg.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 8 | ||||
-rw-r--r-- | drivers/usb/input/acecad.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/itmtouch.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/pid.c | 2 | ||||
-rw-r--r-- | drivers/usb/media/w9968cf.c | 12 | ||||
-rw-r--r-- | drivers/usb/misc/usbtest.c | 2 |
14 files changed, 29 insertions, 33 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index bb1db1959854..c466739428b2 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
@@ -960,7 +960,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, | |||
960 | intf->altsetting->desc.bInterfaceNumber); | 960 | intf->altsetting->desc.bInterfaceNumber); |
961 | 961 | ||
962 | /* instance init */ | 962 | /* instance init */ |
963 | instance = kcalloc(1, sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL); | 963 | instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL); |
964 | if (!instance) { | 964 | if (!instance) { |
965 | dev_dbg(dev, "%s: no memory for instance data!\n", __func__); | 965 | dev_dbg(dev, "%s: no memory for instance data!\n", __func__); |
966 | return -ENOMEM; | 966 | return -ENOMEM; |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 79422a3b07bc..12ecdb03ee5f 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -782,7 +782,7 @@ static int usb_register_bus(struct usb_bus *bus) | |||
782 | return -E2BIG; | 782 | return -E2BIG; |
783 | } | 783 | } |
784 | 784 | ||
785 | bus->class_dev = class_device_create(usb_host_class, MKDEV(0,0), bus->controller, "usb%d", busnum); | 785 | bus->class_dev = class_device_create(usb_host_class, MKDEV(0,0), bus->controller, "usb_host%d", busnum); |
786 | if (IS_ERR(bus->class_dev)) { | 786 | if (IS_ERR(bus->class_dev)) { |
787 | clear_bit(busnum, busmap.busmap); | 787 | clear_bit(busnum, busmap.busmap); |
788 | up(&usb_bus_list_lock); | 788 | up(&usb_bus_list_lock); |
@@ -1669,7 +1669,7 @@ struct usb_hcd *usb_create_hcd (const struct hc_driver *driver, | |||
1669 | { | 1669 | { |
1670 | struct usb_hcd *hcd; | 1670 | struct usb_hcd *hcd; |
1671 | 1671 | ||
1672 | hcd = kcalloc(1, sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL); | 1672 | hcd = kzalloc(sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL); |
1673 | if (!hcd) { | 1673 | if (!hcd) { |
1674 | dev_dbg (dev, "hcd alloc failed\n"); | 1674 | dev_dbg (dev, "hcd alloc failed\n"); |
1675 | return NULL; | 1675 | return NULL; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index c3e46d24a37e..c9412daff682 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1570,7 +1570,7 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1570 | struct usb_driver *driver; | 1570 | struct usb_driver *driver; |
1571 | 1571 | ||
1572 | intf = udev->actconfig->interface[i]; | 1572 | intf = udev->actconfig->interface[i]; |
1573 | if (state <= intf->dev.power.power_state) | 1573 | if (state.event <= intf->dev.power.power_state.event) |
1574 | continue; | 1574 | continue; |
1575 | if (!intf->dev.driver) | 1575 | if (!intf->dev.driver) |
1576 | continue; | 1576 | continue; |
@@ -1578,11 +1578,11 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1578 | 1578 | ||
1579 | if (driver->suspend) { | 1579 | if (driver->suspend) { |
1580 | status = driver->suspend(intf, state); | 1580 | status = driver->suspend(intf, state); |
1581 | if (intf->dev.power.power_state != state | 1581 | if (intf->dev.power.power_state.event != state.event |
1582 | || status) | 1582 | || status) |
1583 | dev_err(&intf->dev, | 1583 | dev_err(&intf->dev, |
1584 | "suspend %d fail, code %d\n", | 1584 | "suspend %d fail, code %d\n", |
1585 | state, status); | 1585 | state.event, status); |
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | /* only drivers with suspend() can ever resume(); | 1588 | /* only drivers with suspend() can ever resume(); |
@@ -1595,7 +1595,7 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1595 | * since we know every driver's probe/disconnect works | 1595 | * since we know every driver's probe/disconnect works |
1596 | * even for drivers that can't suspend. | 1596 | * even for drivers that can't suspend. |
1597 | */ | 1597 | */ |
1598 | if (!driver->suspend || state > PM_SUSPEND_MEM) { | 1598 | if (!driver->suspend || state.event > PM_EVENT_FREEZE) { |
1599 | #if 1 | 1599 | #if 1 |
1600 | dev_warn(&intf->dev, "resume is unsafe!\n"); | 1600 | dev_warn(&intf->dev, "resume is unsafe!\n"); |
1601 | #else | 1601 | #else |
@@ -1616,7 +1616,7 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1616 | * policies (when HNP doesn't apply) once we have mechanisms to | 1616 | * policies (when HNP doesn't apply) once we have mechanisms to |
1617 | * turn power back on! (Likely not before 2.7...) | 1617 | * turn power back on! (Likely not before 2.7...) |
1618 | */ | 1618 | */ |
1619 | if (state > PM_SUSPEND_MEM) { | 1619 | if (state.event > PM_EVENT_FREEZE) { |
1620 | dev_warn(&udev->dev, "no poweroff yet, suspending instead\n"); | 1620 | dev_warn(&udev->dev, "no poweroff yet, suspending instead\n"); |
1621 | } | 1621 | } |
1622 | 1622 | ||
@@ -1733,7 +1733,7 @@ static int finish_port_resume(struct usb_device *udev) | |||
1733 | struct usb_driver *driver; | 1733 | struct usb_driver *driver; |
1734 | 1734 | ||
1735 | intf = udev->actconfig->interface[i]; | 1735 | intf = udev->actconfig->interface[i]; |
1736 | if (intf->dev.power.power_state == PMSG_ON) | 1736 | if (intf->dev.power.power_state.event == PM_EVENT_ON) |
1737 | continue; | 1737 | continue; |
1738 | if (!intf->dev.driver) { | 1738 | if (!intf->dev.driver) { |
1739 | /* FIXME maybe force to alt 0 */ | 1739 | /* FIXME maybe force to alt 0 */ |
@@ -1747,11 +1747,11 @@ static int finish_port_resume(struct usb_device *udev) | |||
1747 | 1747 | ||
1748 | /* can we do better than just logging errors? */ | 1748 | /* can we do better than just logging errors? */ |
1749 | status = driver->resume(intf); | 1749 | status = driver->resume(intf); |
1750 | if (intf->dev.power.power_state != PMSG_ON | 1750 | if (intf->dev.power.power_state.event != PM_EVENT_ON |
1751 | || status) | 1751 | || status) |
1752 | dev_dbg(&intf->dev, | 1752 | dev_dbg(&intf->dev, |
1753 | "resume fail, state %d code %d\n", | 1753 | "resume fail, state %d code %d\n", |
1754 | intf->dev.power.power_state, status); | 1754 | intf->dev.power.power_state.event, status); |
1755 | } | 1755 | } |
1756 | status = 0; | 1756 | status = 0; |
1757 | 1757 | ||
@@ -1934,7 +1934,7 @@ static int hub_resume(struct usb_interface *intf) | |||
1934 | unsigned port1; | 1934 | unsigned port1; |
1935 | int status; | 1935 | int status; |
1936 | 1936 | ||
1937 | if (intf->dev.power.power_state == PM_SUSPEND_ON) | 1937 | if (intf->dev.power.power_state.event == PM_EVENT_ON) |
1938 | return 0; | 1938 | return 0; |
1939 | 1939 | ||
1940 | for (port1 = 1; port1 <= hdev->maxchild; port1++) { | 1940 | for (port1 = 1; port1 <= hdev->maxchild; port1++) { |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 99c85d2f92da..2cddd8a00437 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -1400,7 +1400,7 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) | |||
1400 | driver = to_usb_driver(dev->driver); | 1400 | driver = to_usb_driver(dev->driver); |
1401 | 1401 | ||
1402 | /* there's only one USB suspend state */ | 1402 | /* there's only one USB suspend state */ |
1403 | if (intf->dev.power.power_state) | 1403 | if (intf->dev.power.power_state.event) |
1404 | return 0; | 1404 | return 0; |
1405 | 1405 | ||
1406 | if (driver->suspend) | 1406 | if (driver->suspend) |
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index b01efb6b36f6..65ac9fef3a7c 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c | |||
@@ -641,7 +641,7 @@ show_registers (struct class_device *class_dev, char *buf) | |||
641 | 641 | ||
642 | spin_lock_irqsave (&ehci->lock, flags); | 642 | spin_lock_irqsave (&ehci->lock, flags); |
643 | 643 | ||
644 | if (bus->controller->power.power_state) { | 644 | if (bus->controller->power.power_state.event) { |
645 | size = scnprintf (next, size, | 645 | size = scnprintf (next, size, |
646 | "bus %s, device %s (driver " DRIVER_VERSION ")\n" | 646 | "bus %s, device %s (driver " DRIVER_VERSION ")\n" |
647 | "%s\n" | 647 | "%s\n" |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index b56f25864ed6..4c972b57c7c3 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -638,7 +638,7 @@ iso_stream_alloc (unsigned mem_flags) | |||
638 | { | 638 | { |
639 | struct ehci_iso_stream *stream; | 639 | struct ehci_iso_stream *stream; |
640 | 640 | ||
641 | stream = kcalloc(1, sizeof *stream, mem_flags); | 641 | stream = kzalloc(sizeof *stream, mem_flags); |
642 | if (likely (stream != NULL)) { | 642 | if (likely (stream != NULL)) { |
643 | INIT_LIST_HEAD(&stream->td_list); | 643 | INIT_LIST_HEAD(&stream->td_list); |
644 | INIT_LIST_HEAD(&stream->free_list); | 644 | INIT_LIST_HEAD(&stream->free_list); |
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index 76cb496c5836..75128c371800 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -717,7 +717,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd, | |||
717 | } | 717 | } |
718 | /* avoid all allocations within spinlocks: request or endpoint */ | 718 | /* avoid all allocations within spinlocks: request or endpoint */ |
719 | if (!hep->hcpriv) { | 719 | if (!hep->hcpriv) { |
720 | ep = kcalloc(1, sizeof *ep, mem_flags); | 720 | ep = kzalloc(sizeof *ep, mem_flags); |
721 | if (!ep) | 721 | if (!ep) |
722 | return -ENOMEM; | 722 | return -ENOMEM; |
723 | } | 723 | } |
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index c58408c95c3d..447f488f5d93 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c | |||
@@ -631,7 +631,7 @@ show_registers (struct class_device *class_dev, char *buf) | |||
631 | hcd->product_desc, | 631 | hcd->product_desc, |
632 | hcd_name); | 632 | hcd_name); |
633 | 633 | ||
634 | if (bus->controller->power.power_state) { | 634 | if (bus->controller->power.power_state.event) { |
635 | size -= scnprintf (next, size, | 635 | size -= scnprintf (next, size, |
636 | "SUSPENDED (no register access)\n"); | 636 | "SUSPENDED (no register access)\n"); |
637 | goto done; | 637 | goto done; |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 7a890a65f55d..d2a1fd40dfcb 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -835,7 +835,7 @@ static int sl811h_urb_enqueue( | |||
835 | 835 | ||
836 | /* avoid all allocations within spinlocks */ | 836 | /* avoid all allocations within spinlocks */ |
837 | if (!hep->hcpriv) | 837 | if (!hep->hcpriv) |
838 | ep = kcalloc(1, sizeof *ep, mem_flags); | 838 | ep = kzalloc(sizeof *ep, mem_flags); |
839 | 839 | ||
840 | spin_lock_irqsave(&sl811->lock, flags); | 840 | spin_lock_irqsave(&sl811->lock, flags); |
841 | 841 | ||
@@ -1781,9 +1781,9 @@ sl811h_suspend(struct device *dev, pm_message_t state, u32 phase) | |||
1781 | if (phase != SUSPEND_POWER_DOWN) | 1781 | if (phase != SUSPEND_POWER_DOWN) |
1782 | return retval; | 1782 | return retval; |
1783 | 1783 | ||
1784 | if (state <= PM_SUSPEND_MEM) | 1784 | if (state.event == PM_EVENT_FREEZE) |
1785 | retval = sl811h_hub_suspend(hcd); | 1785 | retval = sl811h_hub_suspend(hcd); |
1786 | else | 1786 | else if (state.event == PM_EVENT_SUSPEND) |
1787 | port_power(sl811, 0); | 1787 | port_power(sl811, 0); |
1788 | if (retval == 0) | 1788 | if (retval == 0) |
1789 | dev->power.power_state = state; | 1789 | dev->power.power_state = state; |
@@ -1802,7 +1802,7 @@ sl811h_resume(struct device *dev, u32 phase) | |||
1802 | /* with no "check to see if VBUS is still powered" board hook, | 1802 | /* with no "check to see if VBUS is still powered" board hook, |
1803 | * let's assume it'd only be powered to enable remote wakeup. | 1803 | * let's assume it'd only be powered to enable remote wakeup. |
1804 | */ | 1804 | */ |
1805 | if (dev->power.power_state > PM_SUSPEND_MEM | 1805 | if (dev->power.power_state.event == PM_EVENT_SUSPEND |
1806 | || !hcd->can_wakeup) { | 1806 | || !hcd->can_wakeup) { |
1807 | sl811->port1 = 0; | 1807 | sl811->port1 = 0; |
1808 | port_power(sl811, 1); | 1808 | port_power(sl811, 1); |
diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c index 13532f3e3efc..74f8760d7c07 100644 --- a/drivers/usb/input/acecad.c +++ b/drivers/usb/input/acecad.c | |||
@@ -152,7 +152,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ | |||
152 | pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); | 152 | pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); |
153 | maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); | 153 | maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); |
154 | 154 | ||
155 | acecad = kcalloc(1, sizeof(struct usb_acecad), GFP_KERNEL); | 155 | acecad = kzalloc(sizeof(struct usb_acecad), GFP_KERNEL); |
156 | if (!acecad) | 156 | if (!acecad) |
157 | return -ENOMEM; | 157 | return -ENOMEM; |
158 | 158 | ||
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c index 0dc439f10823..becb87efb869 100644 --- a/drivers/usb/input/itmtouch.c +++ b/drivers/usb/input/itmtouch.c | |||
@@ -166,7 +166,7 @@ static int itmtouch_probe(struct usb_interface *intf, const struct usb_device_id | |||
166 | interface = intf->cur_altsetting; | 166 | interface = intf->cur_altsetting; |
167 | endpoint = &interface->endpoint[0].desc; | 167 | endpoint = &interface->endpoint[0].desc; |
168 | 168 | ||
169 | if (!(itmtouch = kcalloc(1, sizeof(struct itmtouch_dev), GFP_KERNEL))) { | 169 | if (!(itmtouch = kzalloc(sizeof(struct itmtouch_dev), GFP_KERNEL))) { |
170 | err("%s - Out of memory.", __FUNCTION__); | 170 | err("%s - Out of memory.", __FUNCTION__); |
171 | return -ENOMEM; | 171 | return -ENOMEM; |
172 | } | 172 | } |
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c index 256963863478..acc71ec560e9 100644 --- a/drivers/usb/input/pid.c +++ b/drivers/usb/input/pid.c | |||
@@ -263,7 +263,7 @@ int hid_pid_init(struct hid_device *hid) | |||
263 | struct hid_ff_pid *private; | 263 | struct hid_ff_pid *private; |
264 | struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list); | 264 | struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list); |
265 | 265 | ||
266 | private = hid->ff_private = kcalloc(1, sizeof(struct hid_ff_pid), GFP_KERNEL); | 266 | private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL); |
267 | if (!private) | 267 | if (!private) |
268 | return -ENOMEM; | 268 | return -ENOMEM; |
269 | 269 | ||
diff --git a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c index ca9f3a30634f..f36c0b6c6e36 100644 --- a/drivers/usb/media/w9968cf.c +++ b/drivers/usb/media/w9968cf.c | |||
@@ -1523,7 +1523,6 @@ static u32 w9968cf_i2c_func(struct i2c_adapter* adap) | |||
1523 | static int w9968cf_i2c_attach_inform(struct i2c_client* client) | 1523 | static int w9968cf_i2c_attach_inform(struct i2c_client* client) |
1524 | { | 1524 | { |
1525 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); | 1525 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); |
1526 | const char* clientname = i2c_clientname(client); | ||
1527 | int id = client->driver->id, err = 0; | 1526 | int id = client->driver->id, err = 0; |
1528 | 1527 | ||
1529 | if (id == I2C_DRIVERID_OVCAMCHIP) { | 1528 | if (id == I2C_DRIVERID_OVCAMCHIP) { |
@@ -1535,12 +1534,12 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client) | |||
1535 | } | 1534 | } |
1536 | } else { | 1535 | } else { |
1537 | DBG(4, "Rejected client [%s] with driver [%s]", | 1536 | DBG(4, "Rejected client [%s] with driver [%s]", |
1538 | clientname, client->driver->name) | 1537 | client->name, client->driver->name) |
1539 | return -EINVAL; | 1538 | return -EINVAL; |
1540 | } | 1539 | } |
1541 | 1540 | ||
1542 | DBG(5, "I2C attach client [%s] with driver [%s]", | 1541 | DBG(5, "I2C attach client [%s] with driver [%s]", |
1543 | clientname, client->driver->name) | 1542 | client->name, client->driver->name) |
1544 | 1543 | ||
1545 | return 0; | 1544 | return 0; |
1546 | } | 1545 | } |
@@ -1549,12 +1548,11 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client) | |||
1549 | static int w9968cf_i2c_detach_inform(struct i2c_client* client) | 1548 | static int w9968cf_i2c_detach_inform(struct i2c_client* client) |
1550 | { | 1549 | { |
1551 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); | 1550 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); |
1552 | const char* clientname = i2c_clientname(client); | ||
1553 | 1551 | ||
1554 | if (cam->sensor_client == client) | 1552 | if (cam->sensor_client == client) |
1555 | cam->sensor_client = NULL; | 1553 | cam->sensor_client = NULL; |
1556 | 1554 | ||
1557 | DBG(5, "I2C detach client [%s]", clientname) | 1555 | DBG(5, "I2C detach client [%s]", client->name) |
1558 | 1556 | ||
1559 | return 0; | 1557 | return 0; |
1560 | } | 1558 | } |
@@ -1573,15 +1571,13 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam) | |||
1573 | int err = 0; | 1571 | int err = 0; |
1574 | 1572 | ||
1575 | static struct i2c_algorithm algo = { | 1573 | static struct i2c_algorithm algo = { |
1576 | .name = "W996[87]CF algorithm", | ||
1577 | .id = I2C_ALGO_SMBUS, | ||
1578 | .smbus_xfer = w9968cf_i2c_smbus_xfer, | 1574 | .smbus_xfer = w9968cf_i2c_smbus_xfer, |
1579 | .algo_control = w9968cf_i2c_control, | 1575 | .algo_control = w9968cf_i2c_control, |
1580 | .functionality = w9968cf_i2c_func, | 1576 | .functionality = w9968cf_i2c_func, |
1581 | }; | 1577 | }; |
1582 | 1578 | ||
1583 | static struct i2c_adapter adap = { | 1579 | static struct i2c_adapter adap = { |
1584 | .id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_W9968CF, | 1580 | .id = I2C_HW_SMBUS_W9968CF, |
1585 | .class = I2C_CLASS_CAM_DIGITAL, | 1581 | .class = I2C_CLASS_CAM_DIGITAL, |
1586 | .owner = THIS_MODULE, | 1582 | .owner = THIS_MODULE, |
1587 | .client_register = w9968cf_i2c_attach_inform, | 1583 | .client_register = w9968cf_i2c_attach_inform, |
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index cda7249a90b2..fd7fb98e4b20 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1533,7 +1533,7 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) | |||
1533 | if (down_interruptible (&dev->sem)) | 1533 | if (down_interruptible (&dev->sem)) |
1534 | return -ERESTARTSYS; | 1534 | return -ERESTARTSYS; |
1535 | 1535 | ||
1536 | if (intf->dev.power.power_state != PMSG_ON) { | 1536 | if (intf->dev.power.power_state.event != PM_EVENT_ON) { |
1537 | up (&dev->sem); | 1537 | up (&dev->sem); |
1538 | return -EHOSTUNREACH; | 1538 | return -EHOSTUNREACH; |
1539 | } | 1539 | } |