aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/pcf50633-backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/pcf50633-backlight.c')
-rw-r--r--drivers/video/backlight/pcf50633-backlight.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c
index 6ed76be18f19..b95d3b0aaffe 100644
--- a/drivers/video/backlight/pcf50633-backlight.c
+++ b/drivers/video/backlight/pcf50633-backlight.c
@@ -103,7 +103,7 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
103{ 103{
104 struct pcf50633_bl *pcf_bl; 104 struct pcf50633_bl *pcf_bl;
105 struct device *parent = pdev->dev.parent; 105 struct device *parent = pdev->dev.parent;
106 struct pcf50633_platform_data *pcf50633_data = parent->platform_data; 106 struct pcf50633_platform_data *pcf50633_data = dev_get_platdata(parent);
107 struct pcf50633_bl_platform_data *pdata = pcf50633_data->backlight_data; 107 struct pcf50633_bl_platform_data *pdata = pcf50633_data->backlight_data;
108 struct backlight_properties bl_props; 108 struct backlight_properties bl_props;
109 109
@@ -126,7 +126,8 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
126 126
127 pcf_bl->pcf = dev_to_pcf50633(pdev->dev.parent); 127 pcf_bl->pcf = dev_to_pcf50633(pdev->dev.parent);
128 128
129 pcf_bl->bl = backlight_device_register(pdev->name, &pdev->dev, pcf_bl, 129 pcf_bl->bl = devm_backlight_device_register(&pdev->dev, pdev->name,
130 &pdev->dev, pcf_bl,
130 &pcf50633_bl_ops, &bl_props); 131 &pcf50633_bl_ops, &bl_props);
131 132
132 if (IS_ERR(pcf_bl->bl)) 133 if (IS_ERR(pcf_bl->bl))
@@ -147,18 +148,8 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
147 return 0; 148 return 0;
148} 149}
149 150
150static int pcf50633_bl_remove(struct platform_device *pdev)
151{
152 struct pcf50633_bl *pcf_bl = platform_get_drvdata(pdev);
153
154 backlight_device_unregister(pcf_bl->bl);
155
156 return 0;
157}
158
159static struct platform_driver pcf50633_bl_driver = { 151static struct platform_driver pcf50633_bl_driver = {
160 .probe = pcf50633_bl_probe, 152 .probe = pcf50633_bl_probe,
161 .remove = pcf50633_bl_remove,
162 .driver = { 153 .driver = {
163 .name = "pcf50633-backlight", 154 .name = "pcf50633-backlight",
164 }, 155 },