Re: [PATCH] leds: pca9532: Convert to devm_input_allocate_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 25, 2012 at 2:16 AM, Axel Lin <axel.lin@xxxxxxxxxx> wrote:
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>

OK, merged into my for-next branch.

Thanks,
-Bryan

> ---
>  drivers/leds/leds-pca9532.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
> index cee8a5b..43d08df 100644
> --- a/drivers/leds/leds-pca9532.c
> +++ b/drivers/leds/leds-pca9532.c
> @@ -311,7 +311,6 @@ static int pca9532_destroy_devices(struct pca9532_data *data, int n_devs)
>                         break;
>                 case PCA9532_TYPE_N2100_BEEP:
>                         if (data->idev != NULL) {
> -                               input_unregister_device(data->idev);
>                                 cancel_work_sync(&data->work);
>                                 data->idev = NULL;
>                         }
> @@ -382,7 +381,7 @@ static int pca9532_configure(struct i2c_client *client,
>                         BUG_ON(data->idev);
>                         led->state = PCA9532_PWM1;
>                         pca9532_setled(led);
> -                       data->idev = input_allocate_device();
> +                       data->idev = devm_input_allocate_device(&client->dev);
>                         if (data->idev == NULL) {
>                                 err = -ENOMEM;
>                                 goto exit;
> @@ -401,7 +400,6 @@ static int pca9532_configure(struct i2c_client *client,
>                         INIT_WORK(&data->work, pca9532_input_work);
>                         err = input_register_device(data->idev);
>                         if (err) {
> -                               input_free_device(data->idev);
>                                 cancel_work_sync(&data->work);
>                                 data->idev = NULL;
>                                 goto exit;
> --
> 1.7.9.5
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux