diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2014-05-28 03:44:37 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-06-01 16:22:20 -0400 |
commit | 93e953d3785fa6fc7fda4b64bd38d003f1dcb1d2 (patch) | |
tree | d3c7d4c417052c7a91f471ac1d335aa404c086cf /drivers/i2c/busses/i2c-rcar.c | |
parent | 1c176d534f81c350f67dd4dc6d0330a45c11c9a6 (diff) |
i2c: rcar: no need to store irq number
We use devm, so irq number is only needed during probe.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-rcar.c')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index de4e6b81fa9b..5a3e8a12e8d5 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c | |||
@@ -116,7 +116,6 @@ struct rcar_i2c_priv { | |||
116 | wait_queue_head_t wait; | 116 | wait_queue_head_t wait; |
117 | 117 | ||
118 | int pos; | 118 | int pos; |
119 | int irq; | ||
120 | u32 icccr; | 119 | u32 icccr; |
121 | u32 flags; | 120 | u32 flags; |
122 | enum rcar_i2c_type devtype; | 121 | enum rcar_i2c_type devtype; |
@@ -653,7 +652,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) | |||
653 | struct resource *res; | 652 | struct resource *res; |
654 | struct device *dev = &pdev->dev; | 653 | struct device *dev = &pdev->dev; |
655 | u32 bus_speed; | 654 | u32 bus_speed; |
656 | int ret; | 655 | int irq, ret; |
657 | 656 | ||
658 | priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); | 657 | priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); |
659 | if (!priv) { | 658 | if (!priv) { |
@@ -687,7 +686,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) | |||
687 | if (IS_ERR(priv->io)) | 686 | if (IS_ERR(priv->io)) |
688 | return PTR_ERR(priv->io); | 687 | return PTR_ERR(priv->io); |
689 | 688 | ||
690 | priv->irq = platform_get_irq(pdev, 0); | 689 | irq = platform_get_irq(pdev, 0); |
691 | init_waitqueue_head(&priv->wait); | 690 | init_waitqueue_head(&priv->wait); |
692 | spin_lock_init(&priv->lock); | 691 | spin_lock_init(&priv->lock); |
693 | 692 | ||
@@ -701,10 +700,10 @@ static int rcar_i2c_probe(struct platform_device *pdev) | |||
701 | i2c_set_adapdata(adap, priv); | 700 | i2c_set_adapdata(adap, priv); |
702 | strlcpy(adap->name, pdev->name, sizeof(adap->name)); | 701 | strlcpy(adap->name, pdev->name, sizeof(adap->name)); |
703 | 702 | ||
704 | ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, 0, | 703 | ret = devm_request_irq(dev, irq, rcar_i2c_irq, 0, |
705 | dev_name(dev), priv); | 704 | dev_name(dev), priv); |
706 | if (ret < 0) { | 705 | if (ret < 0) { |
707 | dev_err(dev, "cannot get irq %d\n", priv->irq); | 706 | dev_err(dev, "cannot get irq %d\n", irq); |
708 | return ret; | 707 | return ret; |
709 | } | 708 | } |
710 | 709 | ||