1 Index: linux-2.6.25/drivers/usb/host/adm5120-dbg.c
2 ===================================================================
3 --- linux-2.6.25.orig/drivers/usb/host/adm5120-dbg.c
4 +++ linux-2.6.25/drivers/usb/host/adm5120-dbg.c
5 @@ -456,7 +456,7 @@ show_list(struct admhcd *ahcd, char *buf
9 -show_async(struct class_device *class_dev, char *buf)
10 +show_async(struct device *dev, struct device_attribute *attr, char *buf)
14 @@ -464,7 +464,7 @@ show_async(struct class_device *class_de
18 - bus = class_get_devdata(class_dev);
19 + bus = dev_get_drvdata(dev);
20 hcd = bus_to_hcd(bus);
21 ahcd = hcd_to_admhcd(hcd);
23 @@ -475,13 +475,13 @@ show_async(struct class_device *class_de
27 -static CLASS_DEVICE_ATTR(async, S_IRUGO, show_async, NULL);
28 +static DEVICE_ATTR(async, S_IRUGO, show_async, NULL);
31 #define DBG_SCHED_LIMIT 64
34 -show_periodic(struct class_device *class_dev, char *buf)
35 +show_periodic(struct device *dev, struct device_attribute *attr, char *buf)
39 @@ -496,7 +496,7 @@ show_periodic(struct class_device *class
43 - bus = class_get_devdata(class_dev);
44 + bus = dev_get_drvdata(dev);
45 hcd = bus_to_hcd(bus);
46 ahcd = hcd_to_admhcd(hcd);
48 @@ -574,13 +574,13 @@ show_periodic(struct class_device *class
50 return PAGE_SIZE - size;
52 -static CLASS_DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL);
53 +static DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL);
56 #undef DBG_SCHED_LIMIT
59 -show_registers(struct class_device *class_dev, char *buf)
60 +show_registers(struct device *dev, struct device_attribute *attr, char *buf)
64 @@ -591,7 +591,7 @@ show_registers(struct class_device *clas
68 - bus = class_get_devdata(class_dev);
69 + bus = dev_get_drvdata(dev);
70 hcd = bus_to_hcd(bus);
71 ahcd = hcd_to_admhcd(hcd);
73 @@ -656,27 +656,27 @@ done:
74 spin_unlock_irqrestore(&ahcd->lock, flags);
75 return PAGE_SIZE - size;
77 -static CLASS_DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL);
78 +static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL);
81 static inline void create_debug_files (struct admhcd *ahcd)
83 - struct class_device *cldev = admhcd_to_hcd(ahcd)->self.class_dev;
84 + struct device *dev = admhcd_to_hcd(ahcd)->self.dev;
87 - retval = class_device_create_file(cldev, &class_device_attr_async);
88 - retval = class_device_create_file(cldev, &class_device_attr_periodic);
89 - retval = class_device_create_file(cldev, &class_device_attr_registers);
90 + retval = device_create_file(dev, &dev_attr_async);
91 + retval = device_create_file(dev, &dev_attr_periodic);
92 + retval = device_create_file(dev, &dev_attr_registers);
93 admhc_dbg(ahcd, "created debug files\n");
96 static inline void remove_debug_files (struct admhcd *ahcd)
98 - struct class_device *cldev = admhcd_to_hcd(ahcd)->self.class_dev;
99 + struct device *dev = admhcd_to_hcd(ahcd)->self.dev;
101 - class_device_remove_file(cldev, &class_device_attr_async);
102 - class_device_remove_file(cldev, &class_device_attr_periodic);
103 - class_device_remove_file(cldev, &class_device_attr_registers);
104 + device_remove_file(dev, &dev_attr_async);
105 + device_remove_file(dev, &dev_attr_periodic);
106 + device_remove_file(dev, &dev_attr_registers);