[adm5120] fix support for 2.6.38 kernel
[openwrt.git] / target / linux / adm5120 / patches-2.6.38 / 010-adm5120_usb_new_api.patch
1 --- a/drivers/usb/host/adm5120-hcd.c
2 +++ b/drivers/usb/host/adm5120-hcd.c
3 @@ -32,6 +32,7 @@
4 #include <linux/list.h>
5 #include <linux/usb.h>
6 #include <linux/usb/otg.h>
7 +#include <linux/usb/hcd.h>
8 #include <linux/dma-mapping.h>
9 #include <linux/dmapool.h>
10 #include <linux/reboot.h>
11 @@ -43,8 +44,6 @@
12 #include <asm/unaligned.h>
13 #include <asm/byteorder.h>
14
15 -#include "../core/hcd.h"
16 -#include "../core/hub.h"
17
18 #define DRIVER_VERSION "0.27.0"
19 #define DRIVER_AUTHOR "Gabor Juhos <juhosg@openwrt.org>"
20 @@ -571,7 +570,7 @@ static int admhc_run(struct admhcd *ahcd
21 periodic_reinit(ahcd);
22
23 /* use rhsc irqs after khubd is fully initialized */
24 - hcd->poll_rh = 1;
25 + set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
26 hcd->uses_new_polling = 1;
27
28 #if 0
29 @@ -688,7 +687,7 @@ static irqreturn_t admhc_irq(struct usb_
30 */
31 admhc_vdbg(ahcd, "Resume Detect\n");
32 admhc_intr_ack(ahcd, ADMHC_INTR_RESI);
33 - hcd->poll_rh = 1;
34 + set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
35 if (ahcd->autostop) {
36 spin_lock(&ahcd->lock);
37 admhc_rh_resume(ahcd);
38 --- a/drivers/usb/host/adm5120-hub.c
39 +++ b/drivers/usb/host/adm5120-hub.c
40 @@ -106,8 +106,11 @@ admhc_hub_status_data(struct usb_hcd *hc
41 }
42 }
43
44 - hcd->poll_rh = admhc_root_hub_state_changes(ahcd, changed,
45 - any_connected);
46 + if (admhc_root_hub_state_changes(ahcd, changed,
47 + any_connected))
48 + set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
49 + else
50 + clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
51
52 done:
53 spin_unlock_irqrestore(&ahcd->lock, flags);
This page took 0.055882 seconds and 5 git commands to generate.