Re: [PATCH 2/5] input: twl6040-vibra: Do not use wrapper for irqrequest

From: Felipe Balbi
Date: Tue Jul 05 2011 - 07:25:12 EST


Hi,

On Tue, Jul 05, 2011 at 12:14:23PM +0300, Peter Ujfalusi wrote:
> diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
> index dbf745d..1178c97 100644
> --- a/drivers/input/misc/twl6040-vibra.c
> +++ b/drivers/input/misc/twl6040-vibra.c
> @@ -47,6 +47,7 @@ struct vibra_info {
> struct workqueue_struct *workqueue;
> struct work_struct play_work;
> struct mutex mutex;
> + int irq;
>
> bool enabled;
> int weak_speed;
> @@ -277,6 +278,13 @@ static int __devinit twl6040_vibra_probe(struct platform_device *pdev)
> goto err_kzalloc;
> }
>
> + info->irq = pdata->irq;
> + if (!info->irq) {
> + dev_err(info->dev, "invalid irq for vibra\n");
> + ret = -EINVAL;
> + goto err_kzalloc;
> + }

ok, they are platform drivers, so you could be using:

info->irq = platform_get_irq(pdev, 0);

if (info->irq < 0) {
dev_err();
ret = info->irq;
goto err_kzalloc;
}

--
balbi

Attachment: signature.asc
Description: Digital signature