diff options
Diffstat (limited to 'arch/arm/common/sa1111.c')
-rw-r--r-- | arch/arm/common/sa1111.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index eb06d0b2cb74..f6d3fdda7067 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -241,14 +241,14 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) | |||
241 | void __iomem *mapbase = get_irq_chip_data(irq); | 241 | void __iomem *mapbase = get_irq_chip_data(irq); |
242 | unsigned long ip0; | 242 | unsigned long ip0; |
243 | 243 | ||
244 | if (flags == IRQT_PROBE) | 244 | if (flags == IRQ_TYPE_PROBE) |
245 | return 0; | 245 | return 0; |
246 | 246 | ||
247 | if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0) | 247 | if ((!(flags & IRQ_TYPE_EDGE_RISING) ^ !(flags & IRQ_TYPE_EDGE_FALLING)) == 0) |
248 | return -EINVAL; | 248 | return -EINVAL; |
249 | 249 | ||
250 | ip0 = sa1111_readl(mapbase + SA1111_INTPOL0); | 250 | ip0 = sa1111_readl(mapbase + SA1111_INTPOL0); |
251 | if (flags & __IRQT_RISEDGE) | 251 | if (flags & IRQ_TYPE_EDGE_RISING) |
252 | ip0 &= ~mask; | 252 | ip0 &= ~mask; |
253 | else | 253 | else |
254 | ip0 |= mask; | 254 | ip0 |= mask; |
@@ -338,14 +338,14 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) | |||
338 | void __iomem *mapbase = get_irq_chip_data(irq); | 338 | void __iomem *mapbase = get_irq_chip_data(irq); |
339 | unsigned long ip1; | 339 | unsigned long ip1; |
340 | 340 | ||
341 | if (flags == IRQT_PROBE) | 341 | if (flags == IRQ_TYPE_PROBE) |
342 | return 0; | 342 | return 0; |
343 | 343 | ||
344 | if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0) | 344 | if ((!(flags & IRQ_TYPE_EDGE_RISING) ^ !(flags & IRQ_TYPE_EDGE_FALLING)) == 0) |
345 | return -EINVAL; | 345 | return -EINVAL; |
346 | 346 | ||
347 | ip1 = sa1111_readl(mapbase + SA1111_INTPOL1); | 347 | ip1 = sa1111_readl(mapbase + SA1111_INTPOL1); |
348 | if (flags & __IRQT_RISEDGE) | 348 | if (flags & IRQ_TYPE_EDGE_RISING) |
349 | ip1 &= ~mask; | 349 | ip1 &= ~mask; |
350 | else | 350 | else |
351 | ip1 |= mask; | 351 | ip1 |= mask; |
@@ -427,7 +427,7 @@ static void sa1111_setup_irq(struct sa1111 *sachip) | |||
427 | /* | 427 | /* |
428 | * Register SA1111 interrupt | 428 | * Register SA1111 interrupt |
429 | */ | 429 | */ |
430 | set_irq_type(sachip->irq, IRQT_RISING); | 430 | set_irq_type(sachip->irq, IRQ_TYPE_EDGE_RISING); |
431 | set_irq_data(sachip->irq, irqbase); | 431 | set_irq_data(sachip->irq, irqbase); |
432 | set_irq_chained_handler(sachip->irq, sa1111_irq_handler); | 432 | set_irq_chained_handler(sachip->irq, sa1111_irq_handler); |
433 | } | 433 | } |
@@ -550,9 +550,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
550 | goto out; | 550 | goto out; |
551 | } | 551 | } |
552 | 552 | ||
553 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), | 553 | dev_set_name(&dev->dev, "%4.4lx", info->offset); |
554 | "%4.4lx", info->offset); | ||
555 | |||
556 | dev->devid = info->devid; | 554 | dev->devid = info->devid; |
557 | dev->dev.parent = sachip->dev; | 555 | dev->dev.parent = sachip->dev; |
558 | dev->dev.bus = &sa1111_bus_type; | 556 | dev->dev.bus = &sa1111_bus_type; |
@@ -560,7 +558,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
560 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; | 558 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; |
561 | dev->res.start = sachip->phys + info->offset; | 559 | dev->res.start = sachip->phys + info->offset; |
562 | dev->res.end = dev->res.start + 511; | 560 | dev->res.end = dev->res.start + 511; |
563 | dev->res.name = dev->dev.bus_id; | 561 | dev->res.name = dev_name(&dev->dev); |
564 | dev->res.flags = IORESOURCE_MEM; | 562 | dev->res.flags = IORESOURCE_MEM; |
565 | dev->mapbase = sachip->base + info->offset; | 563 | dev->mapbase = sachip->base + info->offset; |
566 | dev->skpcr_mask = info->skpcr_mask; | 564 | dev->skpcr_mask = info->skpcr_mask; |
@@ -570,6 +568,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
570 | if (ret) { | 568 | if (ret) { |
571 | printk("SA1111: failed to allocate resource for %s\n", | 569 | printk("SA1111: failed to allocate resource for %s\n", |
572 | dev->res.name); | 570 | dev->res.name); |
571 | dev_set_name(&dev->dev, NULL); | ||
573 | kfree(dev); | 572 | kfree(dev); |
574 | goto out; | 573 | goto out; |
575 | } | 574 | } |
@@ -593,7 +592,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
593 | if (dev->dma_mask != 0xffffffffUL) { | 592 | if (dev->dma_mask != 0xffffffffUL) { |
594 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); | 593 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); |
595 | if (ret) { | 594 | if (ret) { |
596 | printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id); | 595 | dev_err(&dev->dev, "SA1111: Failed to register" |
596 | " with dmabounce\n"); | ||
597 | device_unregister(&dev->dev); | 597 | device_unregister(&dev->dev); |
598 | } | 598 | } |
599 | } | 599 | } |
@@ -627,7 +627,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
627 | if (!sachip) | 627 | if (!sachip) |
628 | return -ENOMEM; | 628 | return -ENOMEM; |
629 | 629 | ||
630 | sachip->clk = clk_get(me, "GPIO27_CLK"); | 630 | sachip->clk = clk_get(me, "SA1111_CLK"); |
631 | if (!sachip->clk) { | 631 | if (!sachip->clk) { |
632 | ret = PTR_ERR(sachip->clk); | 632 | ret = PTR_ERR(sachip->clk); |
633 | goto err_free; | 633 | goto err_free; |