Thread (4 messages) 4 messages, 2 authors, 2014-07-15

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

From: Varka Bhadram <hidden>
Date: 2014-07-15 10:26:24
Also in: linux-fbdev, lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help