diff options
author | Shinya Kuribayashi <shinya.kuribayashi@necel.com> | 2009-11-06 07:45:07 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-12-08 19:19:10 -0500 |
commit | 91b52caec040064b4df540b72ad7f18a22fd0508 (patch) | |
tree | 234d9535c382402847d467a5ba688e4c373e9159 /drivers/i2c | |
parent | e28000a38da803de8d90727bec45f3d7c831a59a (diff) |
i2c-designware: Use platform_get_irq helper
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index eeb1915c59e3..139f5556b610 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c | |||
@@ -548,8 +548,8 @@ static int __devinit dw_i2c_probe(struct platform_device *pdev) | |||
548 | { | 548 | { |
549 | struct dw_i2c_dev *dev; | 549 | struct dw_i2c_dev *dev; |
550 | struct i2c_adapter *adap; | 550 | struct i2c_adapter *adap; |
551 | struct resource *mem, *irq, *ioarea; | 551 | struct resource *mem, *ioarea; |
552 | int r; | 552 | int irq, r; |
553 | 553 | ||
554 | /* NOTE: driver uses the static register mapping */ | 554 | /* NOTE: driver uses the static register mapping */ |
555 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 555 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -558,10 +558,10 @@ static int __devinit dw_i2c_probe(struct platform_device *pdev) | |||
558 | return -EINVAL; | 558 | return -EINVAL; |
559 | } | 559 | } |
560 | 560 | ||
561 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 561 | irq = platform_get_irq(pdev, 0); |
562 | if (!irq) { | 562 | if (irq < 0) { |
563 | dev_err(&pdev->dev, "no irq resource?\n"); | 563 | dev_err(&pdev->dev, "no irq resource?\n"); |
564 | return -EINVAL; | 564 | return irq; /* -ENXIO */ |
565 | } | 565 | } |
566 | 566 | ||
567 | ioarea = request_mem_region(mem->start, resource_size(mem), | 567 | ioarea = request_mem_region(mem->start, resource_size(mem), |
@@ -581,7 +581,7 @@ static int __devinit dw_i2c_probe(struct platform_device *pdev) | |||
581 | tasklet_init(&dev->pump_msg, dw_i2c_pump_msg, (unsigned long) dev); | 581 | tasklet_init(&dev->pump_msg, dw_i2c_pump_msg, (unsigned long) dev); |
582 | mutex_init(&dev->lock); | 582 | mutex_init(&dev->lock); |
583 | dev->dev = get_device(&pdev->dev); | 583 | dev->dev = get_device(&pdev->dev); |
584 | dev->irq = irq->start; | 584 | dev->irq = irq; |
585 | platform_set_drvdata(pdev, dev); | 585 | platform_set_drvdata(pdev, dev); |
586 | 586 | ||
587 | dev->clk = clk_get(&pdev->dev, NULL); | 587 | dev->clk = clk_get(&pdev->dev, NULL); |