[media] m5mols: Remove superfluous irq field from the platform data struct
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Mon, 19 Sep 2011 12:16:01 +0000 (09:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 24 Sep 2011 03:23:03 +0000 (00:23 -0300)
There is no need to put the IRQ number in driver's private platform
data structure as this can also be passed in struct i2c_lient.irq.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/m5mols/m5mols_core.c
include/media/m5mols.h

index fb8e4a7a9dd29f27fdf96a5191a4e1581f5ddf56..5d21d056d6a3523dbd440bc77ea78a8f8df2eee6 100644 (file)
@@ -936,7 +936,7 @@ static int __devinit m5mols_probe(struct i2c_client *client,
                return -EINVAL;
        }
 
-       if (!pdata->irq) {
+       if (!client->irq) {
                dev_err(&client->dev, "Interrupt not assigned\n");
                return -EINVAL;
        }
@@ -973,7 +973,7 @@ static int __devinit m5mols_probe(struct i2c_client *client,
 
        init_waitqueue_head(&info->irq_waitq);
        INIT_WORK(&info->work_irq, m5mols_irq_work);
-       ret = request_irq(pdata->irq, m5mols_irq_handler,
+       ret = request_irq(client->irq, m5mols_irq_handler,
                          IRQF_TRIGGER_RISING, MODULE_NAME, sd);
        if (ret) {
                dev_err(&client->dev, "Interrupt request failed: %d\n", ret);
@@ -998,7 +998,7 @@ static int __devexit m5mols_remove(struct i2c_client *client)
        struct m5mols_info *info = to_m5mols(sd);
 
        v4l2_device_unregister_subdev(sd);
-       free_irq(info->pdata->irq, sd);
+       free_irq(client->irq, sd);
 
        regulator_bulk_free(ARRAY_SIZE(supplies), supplies);
        gpio_free(info->pdata->gpio_reset);
index aac2c0e06d5ee78c6795f23efdd99b6aedf4767e..4a825ae5c6c8ec2469c7b46968089cf683718385 100644 (file)
 
 /**
  * struct m5mols_platform_data - platform data for M-5MOLS driver
- * @irq:       GPIO getting the irq pin of M-5MOLS
  * @gpio_reset:        GPIO driving the reset pin of M-5MOLS
- * @reset_polarity: active state for gpio_rst pin, 0 or 1
+ * @reset_polarity: active state for gpio_reset pin, 0 or 1
  * @set_power: an additional callback to the board setup code
  *             to be called after enabling and before disabling
  *             the sensor's supply regulators
  */
 struct m5mols_platform_data {
-       int irq;
        int gpio_reset;
        u8 reset_polarity;
        int (*set_power)(struct device *dev, int on);