提交 93e953d3 编写于 作者: W Wolfram Sang 提交者: Wolfram Sang

i2c: rcar: no need to store irq number

We use devm, so irq number is only needed during probe.
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 1c176d53
...@@ -116,7 +116,6 @@ struct rcar_i2c_priv { ...@@ -116,7 +116,6 @@ struct rcar_i2c_priv {
wait_queue_head_t wait; wait_queue_head_t wait;
int pos; int pos;
int irq;
u32 icccr; u32 icccr;
u32 flags; u32 flags;
enum rcar_i2c_type devtype; enum rcar_i2c_type devtype;
...@@ -653,7 +652,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) ...@@ -653,7 +652,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
u32 bus_speed; u32 bus_speed;
int ret; int irq, ret;
priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
if (!priv) { if (!priv) {
...@@ -687,7 +686,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) ...@@ -687,7 +686,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
if (IS_ERR(priv->io)) if (IS_ERR(priv->io))
return PTR_ERR(priv->io); return PTR_ERR(priv->io);
priv->irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
init_waitqueue_head(&priv->wait); init_waitqueue_head(&priv->wait);
spin_lock_init(&priv->lock); spin_lock_init(&priv->lock);
...@@ -701,10 +700,10 @@ static int rcar_i2c_probe(struct platform_device *pdev) ...@@ -701,10 +700,10 @@ static int rcar_i2c_probe(struct platform_device *pdev)
i2c_set_adapdata(adap, priv); i2c_set_adapdata(adap, priv);
strlcpy(adap->name, pdev->name, sizeof(adap->name)); strlcpy(adap->name, pdev->name, sizeof(adap->name));
ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, 0, ret = devm_request_irq(dev, irq, rcar_i2c_irq, 0,
dev_name(dev), priv); dev_name(dev), priv);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "cannot get irq %d\n", priv->irq); dev_err(dev, "cannot get irq %d\n", irq);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册