diff options
-rw-r--r-- | drivers/i2c/busses/i2c-sh_mobile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index c7f36c1ce688..a758ccc29752 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
@@ -466,8 +466,7 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd) | |||
466 | 466 | ||
467 | static irqreturn_t sh_mobile_i2c_isr(int irq, void *dev_id) | 467 | static irqreturn_t sh_mobile_i2c_isr(int irq, void *dev_id) |
468 | { | 468 | { |
469 | struct platform_device *dev = dev_id; | 469 | struct sh_mobile_i2c_data *pd = dev_id; |
470 | struct sh_mobile_i2c_data *pd = platform_get_drvdata(dev); | ||
471 | unsigned char sr; | 470 | unsigned char sr; |
472 | int wakeup = 0; | 471 | int wakeup = 0; |
473 | 472 | ||
@@ -804,7 +803,7 @@ static void sh_mobile_i2c_release_dma(struct sh_mobile_i2c_data *pd) | |||
804 | } | 803 | } |
805 | } | 804 | } |
806 | 805 | ||
807 | static int sh_mobile_i2c_hook_irqs(struct platform_device *dev) | 806 | static int sh_mobile_i2c_hook_irqs(struct platform_device *dev, struct sh_mobile_i2c_data *pd) |
808 | { | 807 | { |
809 | struct resource *res; | 808 | struct resource *res; |
810 | resource_size_t n; | 809 | resource_size_t n; |
@@ -813,7 +812,7 @@ static int sh_mobile_i2c_hook_irqs(struct platform_device *dev) | |||
813 | while ((res = platform_get_resource(dev, IORESOURCE_IRQ, k))) { | 812 | while ((res = platform_get_resource(dev, IORESOURCE_IRQ, k))) { |
814 | for (n = res->start; n <= res->end; n++) { | 813 | for (n = res->start; n <= res->end; n++) { |
815 | ret = devm_request_irq(&dev->dev, n, sh_mobile_i2c_isr, | 814 | ret = devm_request_irq(&dev->dev, n, sh_mobile_i2c_isr, |
816 | 0, dev_name(&dev->dev), dev); | 815 | 0, dev_name(&dev->dev), pd); |
817 | if (ret) { | 816 | if (ret) { |
818 | dev_err(&dev->dev, "cannot request IRQ %pa\n", &n); | 817 | dev_err(&dev->dev, "cannot request IRQ %pa\n", &n); |
819 | return ret; | 818 | return ret; |
@@ -844,7 +843,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) | |||
844 | return PTR_ERR(pd->clk); | 843 | return PTR_ERR(pd->clk); |
845 | } | 844 | } |
846 | 845 | ||
847 | ret = sh_mobile_i2c_hook_irqs(dev); | 846 | ret = sh_mobile_i2c_hook_irqs(dev, pd); |
848 | if (ret) | 847 | if (ret) |
849 | return ret; | 848 | return ret; |
850 | 849 | ||