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

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

 



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-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux