dect
/
linux-2.6
Archived
13
0
Fork 0

[media] m5mols: Remove superfluous irq field from the platform data struct

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>
This commit is contained in:
Sylwester Nawrocki 2011-09-19 09:16:01 -03:00 committed by Mauro Carvalho Chehab
parent 12ecf56d1a
commit 5b3bdfce67
2 changed files with 4 additions and 6 deletions

View 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);

View File

@ -18,15 +18,13 @@
/**
* 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);