re-sort all target and subtarget config files
[openwrt.git] / target / linux / ar7 / patches / 160-vlynq-bus_id_removal.patch
1 --- a/drivers/vlynq/vlynq.c 2009-05-31 20:41:57.000000000 +0200
2 +++ b/drivers/vlynq/vlynq.c 2009-05-31 22:06:36.000000000 +0200
3 @@ -82,6 +82,7 @@
4 static void vlynq_dump_regs(struct vlynq_device *dev)
5 {
6 int i;
7 +
8 printk(KERN_DEBUG "VLYNQ local=%p remote=%p\n",
9 dev->local, dev->remote);
10 for (i = 0; i < 32; i++) {
11 @@ -95,6 +96,7 @@
12 static void vlynq_dump_mem(u32 *base, int count)
13 {
14 int i;
15 +
16 for (i = 0; i < (count + 3) / 4; i++) {
17 if (i % 4 == 0) printk(KERN_DEBUG "\nMEM[0x%04x]:", i * 4);
18 printk(KERN_DEBUG " 0x%08x", *(base + i));
19 @@ -194,20 +196,24 @@
20 static void vlynq_local_ack(unsigned int irq)
21 {
22 struct vlynq_device *dev = get_irq_chip_data(irq);
23 +
24 u32 status = vlynq_reg_read(dev->local->status);
25 +
26 if (printk_ratelimit())
27 printk(KERN_DEBUG "%s: local status: 0x%08x\n",
28 - dev->dev.bus_id, status);
29 + dev_name(&dev->dev), status);
30 vlynq_reg_write(dev->local->status, status);
31 }
32
33 static void vlynq_remote_ack(unsigned int irq)
34 {
35 struct vlynq_device *dev = get_irq_chip_data(irq);
36 +
37 u32 status = vlynq_reg_read(dev->remote->status);
38 +
39 if (printk_ratelimit())
40 printk(KERN_DEBUG "%s: remote status: 0x%08x\n",
41 - dev->dev.bus_id, status);
42 + dev_name(&dev->dev), status);
43 vlynq_reg_write(dev->remote->status, status);
44 }
45
46 @@ -262,7 +268,7 @@
47 if (dev->local_irq == dev->remote_irq) {
48 printk(KERN_ERR
49 "%s: local vlynq irq should be different from remote\n",
50 - dev->dev.bus_id);
51 + dev_name(&dev->dev));
52 return -EINVAL;
53 }
54
55 @@ -304,7 +310,7 @@
56 }
57
58 if (request_irq(dev->irq, vlynq_irq, IRQF_SHARED, "vlynq", dev)) {
59 - printk(KERN_ERR "%s: request_irq failed\n", dev->dev.bus_id);
60 + printk(KERN_ERR "%s: request_irq failed\n", dev_name(&dev->dev));
61 return -EAGAIN;
62 }
63
64 @@ -403,7 +409,7 @@
65 if (vlynq_linked(dev)) {
66 printk(KERN_DEBUG
67 "%s: using remote clock divisor %d\n",
68 - dev->dev.bus_id, i - vlynq_rdiv1 + 1);
69 + dev_name(&dev->dev), i - vlynq_rdiv1 + 1);
70 dev->divisor = i;
71 return 0;
72 } else {
73 @@ -433,7 +439,7 @@
74 if (vlynq_linked(dev)) {
75 printk(KERN_DEBUG
76 "%s: using local clock divisor %d\n",
77 - dev->dev.bus_id, i - vlynq_ldiv1 + 1);
78 + dev_name(&dev->dev), i - vlynq_ldiv1 + 1);
79 dev->divisor = i;
80 return 0;
81 } else {
82 @@ -460,7 +466,7 @@
83
84 if (vlynq_linked(dev)) {
85 printk(KERN_DEBUG "%s: using external clock\n",
86 - dev->dev.bus_id);
87 + dev_name(&dev->dev));
88 dev->divisor = vlynq_div_external;
89 return 0;
90 }
91 @@ -507,7 +513,7 @@
92 if (vlynq_linked(dev)) {
93 printk(KERN_DEBUG
94 "%s: using local clock divisor %d\n",
95 - dev->dev.bus_id, dev->divisor - vlynq_ldiv1 + 1);
96 + dev_name(&dev->dev), dev->divisor - vlynq_ldiv1 + 1);
97 return 0;
98 }
99 break;
100 @@ -521,7 +527,7 @@
101 if (vlynq_linked(dev)) {
102 printk(KERN_DEBUG
103 "%s: using remote clock divisor %d\n",
104 - dev->dev.bus_id, dev->divisor - vlynq_rdiv1 + 1);
105 + dev_name(&dev->dev), dev->divisor - vlynq_rdiv1 + 1);
106 return 0;
107 }
108 break;
109 @@ -662,8 +668,7 @@
110 dev->id = pdev->id;
111 dev->dev.bus = &vlynq_bus_type;
112 dev->dev.parent = &pdev->dev;
113 - snprintf(dev->dev.bus_id, BUS_ID_SIZE, "vlynq%d", dev->id);
114 - dev->dev.bus_id[BUS_ID_SIZE - 1] = 0;
115 + dev_set_name(&dev->dev, "vlynq%d", dev->id);
116 dev->dev.platform_data = pdev->dev.platform_data;
117 dev->dev.release = vlynq_device_release;
118
119 @@ -673,9 +678,9 @@
120 dev->mem_end = mem_res->end;
121
122 len = regs_res->end - regs_res->start;
123 - if (!request_mem_region(regs_res->start, len, dev->dev.bus_id)) {
124 + if (!request_mem_region(regs_res->start, len, dev_name(&dev->dev))) {
125 printk(KERN_ERR "%s: Can't request vlynq registers\n",
126 - dev->dev.bus_id);
127 + dev_name(&dev->dev));
128 result = -ENXIO;
129 goto fail_request;
130 }
131 @@ -683,7 +688,7 @@
132 dev->local = ioremap(regs_res->start, len);
133 if (!dev->local) {
134 printk(KERN_ERR "%s: Can't remap vlynq registers\n",
135 - dev->dev.bus_id);
136 + dev_name(&dev->dev));
137 result = -ENXIO;
138 goto fail_remap;
139 }
140 @@ -702,7 +707,7 @@
141 platform_set_drvdata(pdev, dev);
142
143 printk(KERN_INFO "%s: regs 0x%p, irq %d, mem 0x%p\n",
144 - dev->dev.bus_id, (void *)dev->regs_start, dev->irq,
145 + dev_name(&dev->dev), (void *)dev->regs_start, dev->irq,
146 (void *)dev->mem_start);
147
148 dev->dev_id = 0;
This page took 0.044441 seconds and 5 git commands to generate.