diff options
author | Steve French <sfrench@us.ibm.com> | 2005-09-06 18:47:31 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-09-06 18:47:31 -0400 |
commit | c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3 (patch) | |
tree | 5fbec9030029da1ec387c18b85f26f19ee50da44 /drivers/usb | |
parent | bfa0d75a1eee59f0577e3c1697ff570b77581a35 (diff) | |
parent | 4706df3d3c42af802597d82c8b1542c3d52eab23 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hcd.c | 2 | ||||
-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/ohci-dbg.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/media/w9968cf.c | 12 | ||||
-rw-r--r-- | drivers/usb/misc/usbtest.c | 2 | ||||
-rw-r--r-- | drivers/usb/net/Makefile | 2 | ||||
-rw-r--r-- | drivers/usb/net/zd1201.c | 16 |
10 files changed, 29 insertions, 35 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 79422a3b07bc..9f44e83c6a69 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); |
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/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..80eaf659c198 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -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/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 | } |
diff --git a/drivers/usb/net/Makefile b/drivers/usb/net/Makefile index 16f352195512..fe3fd4115e1e 100644 --- a/drivers/usb/net/Makefile +++ b/drivers/usb/net/Makefile | |||
@@ -8,5 +8,3 @@ obj-$(CONFIG_USB_PEGASUS) += pegasus.o | |||
8 | obj-$(CONFIG_USB_RTL8150) += rtl8150.o | 8 | obj-$(CONFIG_USB_RTL8150) += rtl8150.o |
9 | obj-$(CONFIG_USB_USBNET) += usbnet.o | 9 | obj-$(CONFIG_USB_USBNET) += usbnet.o |
10 | obj-$(CONFIG_USB_ZD1201) += zd1201.o | 10 | obj-$(CONFIG_USB_ZD1201) += zd1201.o |
11 | |||
12 | CFLAGS_zd1201.o = -Idrivers/net/wireless/ | ||
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index e32a80b39182..fc013978837e 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/if_arp.h> | 22 | #include <linux/if_arp.h> |
23 | #include <linux/firmware.h> | 23 | #include <linux/firmware.h> |
24 | #include <ieee802_11.h> | 24 | #include <net/ieee80211.h> |
25 | #include "zd1201.h" | 25 | #include "zd1201.h" |
26 | 26 | ||
27 | static struct usb_device_id zd1201_table[] = { | 27 | static struct usb_device_id zd1201_table[] = { |
@@ -338,24 +338,24 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) | |||
338 | goto resubmit; | 338 | goto resubmit; |
339 | } | 339 | } |
340 | 340 | ||
341 | if ((seq & IEEE802_11_SCTL_FRAG) || | 341 | if ((seq & IEEE80211_SCTL_FRAG) || |
342 | (fc & IEEE802_11_FCTL_MOREFRAGS)) { | 342 | (fc & IEEE80211_FCTL_MOREFRAGS)) { |
343 | struct zd1201_frag *frag = NULL; | 343 | struct zd1201_frag *frag = NULL; |
344 | char *ptr; | 344 | char *ptr; |
345 | 345 | ||
346 | if (datalen<14) | 346 | if (datalen<14) |
347 | goto resubmit; | 347 | goto resubmit; |
348 | if ((seq & IEEE802_11_SCTL_FRAG) == 0) { | 348 | if ((seq & IEEE80211_SCTL_FRAG) == 0) { |
349 | frag = kmalloc(sizeof(*frag), GFP_ATOMIC); | 349 | frag = kmalloc(sizeof(*frag), GFP_ATOMIC); |
350 | if (!frag) | 350 | if (!frag) |
351 | goto resubmit; | 351 | goto resubmit; |
352 | skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2); | 352 | skb = dev_alloc_skb(IEEE80211_DATA_LEN +14+2); |
353 | if (!skb) { | 353 | if (!skb) { |
354 | kfree(frag); | 354 | kfree(frag); |
355 | goto resubmit; | 355 | goto resubmit; |
356 | } | 356 | } |
357 | frag->skb = skb; | 357 | frag->skb = skb; |
358 | frag->seq = seq & IEEE802_11_SCTL_SEQ; | 358 | frag->seq = seq & IEEE80211_SCTL_SEQ; |
359 | skb_reserve(skb, 2); | 359 | skb_reserve(skb, 2); |
360 | memcpy(skb_put(skb, 12), &data[datalen-14], 12); | 360 | memcpy(skb_put(skb, 12), &data[datalen-14], 12); |
361 | memcpy(skb_put(skb, 2), &data[6], 2); | 361 | memcpy(skb_put(skb, 2), &data[6], 2); |
@@ -364,7 +364,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) | |||
364 | goto resubmit; | 364 | goto resubmit; |
365 | } | 365 | } |
366 | hlist_for_each_entry(frag, node, &zd->fraglist, fnode) | 366 | hlist_for_each_entry(frag, node, &zd->fraglist, fnode) |
367 | if(frag->seq == (seq&IEEE802_11_SCTL_SEQ)) | 367 | if(frag->seq == (seq&IEEE80211_SCTL_SEQ)) |
368 | break; | 368 | break; |
369 | if (!frag) | 369 | if (!frag) |
370 | goto resubmit; | 370 | goto resubmit; |
@@ -372,7 +372,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) | |||
372 | ptr = skb_put(skb, len); | 372 | ptr = skb_put(skb, len); |
373 | if (ptr) | 373 | if (ptr) |
374 | memcpy(ptr, data+8, len); | 374 | memcpy(ptr, data+8, len); |
375 | if (fc & IEEE802_11_FCTL_MOREFRAGS) | 375 | if (fc & IEEE80211_FCTL_MOREFRAGS) |
376 | goto resubmit; | 376 | goto resubmit; |
377 | hlist_del_init(&frag->fnode); | 377 | hlist_del_init(&frag->fnode); |
378 | kfree(frag); | 378 | kfree(frag); |