1 --- a/drivers/usb/host/adm5120-dbg.c
2 +++ b/drivers/usb/host/adm5120-dbg.c
3 @@ -419,7 +419,7 @@ static struct dentry *admhc_debug_root;
6 ssize_t (*fill_func)(struct debug_buffer *); /* fill method */
9 struct mutex mutex; /* protect filling of buffer */
10 size_t count; /* number of characters filled into buffer */
12 @@ -494,15 +494,11 @@ show_list(struct admhcd *ahcd, char *buf
14 static ssize_t fill_async_buffer(struct debug_buffer *buf)
16 - struct usb_bus *bus;
17 - struct usb_hcd *hcd;
22 - bus = dev_get_drvdata(buf->dev);
23 - hcd = bus_to_hcd(bus);
24 - ahcd = hcd_to_admhcd(hcd);
27 spin_lock_irqsave(&ahcd->lock, flags);
28 temp = show_list(ahcd, buf->page, PAGE_SIZE, ahcd->ed_head);
29 @@ -516,8 +512,6 @@ static ssize_t fill_async_buffer(struct
31 static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
33 - struct usb_bus *bus;
34 - struct usb_hcd *hcd;
36 struct ed **seen, *ed;
38 @@ -530,9 +524,7 @@ static ssize_t fill_periodic_buffer(stru
42 - bus = dev_get_drvdata(buf->dev);
43 - hcd = bus_to_hcd(bus);
44 - ahcd = hcd_to_admhcd(hcd);
49 @@ -615,7 +607,6 @@ static ssize_t fill_periodic_buffer(stru
51 static ssize_t fill_registers_buffer(struct debug_buffer *buf)
53 - struct usb_bus *bus;
56 struct admhcd_regs __iomem *regs;
57 @@ -624,9 +615,8 @@ static ssize_t fill_registers_buffer(str
61 - bus = dev_get_drvdata(buf->dev);
62 - hcd = bus_to_hcd(bus);
63 - ahcd = hcd_to_admhcd(hcd);
65 + hcd = admhcd_to_hcd(ahcd);
69 @@ -691,7 +681,7 @@ done:
73 -static struct debug_buffer *alloc_buffer(struct device *dev,
74 +static struct debug_buffer *alloc_buffer(struct admhcd *ahcd,
75 ssize_t (*fill_func)(struct debug_buffer *))
77 struct debug_buffer *buf;
78 @@ -699,7 +689,7 @@ static struct debug_buffer *alloc_buffer
79 buf = kzalloc(sizeof(struct debug_buffer), GFP_KERNEL);
84 buf->fill_func = fill_func;
85 mutex_init(&buf->mutex);
87 @@ -792,26 +782,25 @@ static int debug_registers_open(struct i
88 static inline void create_debug_files(struct admhcd *ahcd)
90 struct usb_bus *bus = &admhcd_to_hcd(ahcd)->self;
91 - struct device *dev = bus->dev;
93 ahcd->debug_dir = debugfs_create_dir(bus->bus_name, admhc_debug_root);
97 ahcd->debug_async = debugfs_create_file("async", S_IRUGO,
98 - ahcd->debug_dir, dev,
99 + ahcd->debug_dir, ahcd,
101 if (!ahcd->debug_async)
104 ahcd->debug_periodic = debugfs_create_file("periodic", S_IRUGO,
105 - ahcd->debug_dir, dev,
106 + ahcd->debug_dir, ahcd,
107 &debug_periodic_fops);
108 if (!ahcd->debug_periodic)
111 ahcd->debug_registers = debugfs_create_file("registers", S_IRUGO,
112 - ahcd->debug_dir, dev,
113 + ahcd->debug_dir, ahcd,
114 &debug_registers_fops);
115 if (!ahcd->debug_registers)
116 goto registers_error;