Re: [RFC v5 1/2] backlight: add new tps611xx backlight driver

From: Varka Bhadram
Date: Tue Jul 15 2014 - 06:26:27 EST


On 07/15/2014 03:39 PM, Daniel Jeong wrote:
(...)

+
+static int tps611xx_backlight_remove(struct platform_device *pdev)
+{
+ struct tps611xx_bl_data *pchip = platform_get_drvdata(pdev);
+ const struct tps611xx_esdata *esdata = pchip->esdata;
+
+ device_remove_file(&(pchip->bled->dev), &dev_attr_enable);
+ gpio_direction_output(pchip->en_gpio, 0);
+ mdelay(esdata->time.reset);
+ return 0;
+}
+

Better to move the of_device_ids also here... We can see of_match_table directly...

+static const struct platform_device_id tps611xx_id_table[] = {
+ {TPS61158_NAME, (unsigned long)&tps611xx_info[TPS61158_ID]},
+ {TPS61161_NAME, (unsigned long)&tps611xx_info[TPS61161_ID]},
+ {TPS61163_NAME, (unsigned long)&tps611xx_info[TPS61163_ID]},
+ {TPS61165_NAME, (unsigned long)&tps611xx_info[TPS61165_ID]},
+ {}
+};
+
+static struct platform_driver tps611xx_backlight_driver = {
+ .driver = {
+ .name = TPS611XX_NAME,
+ .owner = THIS_MODULE,

No need to update .owner

see:http://lxr.free-electrons.com/source/include/linux/platform_device.h#L190

--
Regards,
Varka Bhadram.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/