Re: PATCH [3/3]: Provide generic backlight support in Toshiba ACPI driver

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> @@ -546,6 +591,12 @@ static int __init toshiba_acpi_init(void
>                         remove_proc_entry(PROC_TOSHIBA, acpi_root_dir);
>         }
>
> +       tosh_backlight_device = backlight_device_register ("tosh-bl", NULL,
> +                                                          &toshbl_data);
> +
> +       if (IS_ERR (tosh_backlight_device))
> +               printk("Failed to register Toshiba backlight device\n");
> +
>         return (ACPI_SUCCESS(status)) ? 0 : -ENODEV;
>  }
>

Should not this be

       if (IS_ERR (tosh_backlight_device)) {
               printk("Failed to register Toshiba backlight device\n");
               tosh_backlight_device = NULL;
       }

> @@ -556,6 +607,8 @@ static void __exit toshiba_acpi_exit(voi
>         if (toshiba_proc_dir)
>                 remove_proc_entry(PROC_TOSHIBA, acpi_root_dir);
>
> +       backlight_device_unregister(tosh_backlight_device);
> +
>         return;
>  }

What if it failed register before?

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFERRiyR6LMutpd94wRAgldAJ4mK7HeL0UUY29XewfrCODvfa3t7wCgqLN8
dPbb6SKWJrMdmO3s/o7Gnns=
=JhuH
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux