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
4 static void vlynq_dump_regs(struct vlynq_device *dev)
8 printk(KERN_DEBUG "VLYNQ local=%p remote=%p\n",
9 dev->local, dev->remote);
10 for (i = 0; i < 32; i++) {
12 static void vlynq_dump_mem(u32 *base, int count)
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));
20 static void vlynq_local_ack(unsigned int irq)
22 struct vlynq_device *dev = get_irq_chip_data(irq);
24 u32 status = vlynq_reg_read(dev->local->status);
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);
33 static void vlynq_remote_ack(unsigned int irq)
35 struct vlynq_device *dev = get_irq_chip_data(irq);
37 u32 status = vlynq_reg_read(dev->remote->status);
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);
47 if (dev->local_irq == dev->remote_irq) {
49 "%s: local vlynq irq should be different from remote\n",
51 + dev_name(&dev->dev));
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));
65 if (vlynq_linked(dev)) {
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);
74 if (vlynq_linked(dev)) {
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);
84 if (vlynq_linked(dev)) {
85 printk(KERN_DEBUG "%s: using external clock\n",
87 + dev_name(&dev->dev));
88 dev->divisor = vlynq_div_external;
92 if (vlynq_linked(dev)) {
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);
101 if (vlynq_linked(dev)) {
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);
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;
120 dev->mem_end = mem_res->end;
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",
127 + dev_name(&dev->dev));
132 dev->local = ioremap(regs_res->start, len);
134 printk(KERN_ERR "%s: Can't remap vlynq registers\n",
136 + dev_name(&dev->dev));
141 platform_set_drvdata(pdev, dev);
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);