Commit d7b3ffe2 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 "Fix-ups:
   - Add / improve Device Tree bindings
   - Convert (int) .remove functions to (void) .remove_new
   - Rid 'defined but not used' warnings
   - Remove ineffective casts and pointer stubs
   - Use specifically crafted API for testing DT property presence"

* tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: as3711: Use of_property_read_bool() for boolean properties
  backlight: hx8357: Use of_property_present() for testing DT property presence
  backlight: arcxcnn_bl: Drop of_match_ptr for ID table
  backlight: lp855x: Mark OF related data as maybe unused
  backlight: sky81452-backlight: Convert to platform remove callback returning void
  backlight: rt4831-backlight: Convert to platform remove callback returning void
  backlight: qcom-wled: Convert to platform remove callback returning void
  backlight: pwm_bl: Convert to platform remove callback returning void
  backlight: mt6370-backlight: Convert to platform remove callback returning void
  backlight: lp8788_bl: Convert to platform remove callback returning void
  backlight: lm3533_bl: Convert to platform remove callback returning void
  backlight: led_bl: Convert to platform remove callback returning void
  backlight: hp680_bl: Convert to platform remove callback returning void
  backlight: da9052_bl: Convert to platform remove callback returning void
  backlight: cr_bllcd: Convert to platform remove callback returning void
  backlight: adp5520_bl: Convert to platform remove callback returning void
  backlight: aat2870_bl: Convert to platform remove callback returning void
  backlight: qcom-wled: Add PMI8950 compatible
parents 3af49062 fb200218
...@@ -178,7 +178,7 @@ static int aat2870_bl_probe(struct platform_device *pdev) ...@@ -178,7 +178,7 @@ static int aat2870_bl_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int aat2870_bl_remove(struct platform_device *pdev) static void aat2870_bl_remove(struct platform_device *pdev)
{ {
struct aat2870_bl_driver_data *aat2870_bl = platform_get_drvdata(pdev); struct aat2870_bl_driver_data *aat2870_bl = platform_get_drvdata(pdev);
struct backlight_device *bd = aat2870_bl->bd; struct backlight_device *bd = aat2870_bl->bd;
...@@ -186,8 +186,6 @@ static int aat2870_bl_remove(struct platform_device *pdev) ...@@ -186,8 +186,6 @@ static int aat2870_bl_remove(struct platform_device *pdev)
bd->props.power = FB_BLANK_POWERDOWN; bd->props.power = FB_BLANK_POWERDOWN;
bd->props.brightness = 0; bd->props.brightness = 0;
backlight_update_status(bd); backlight_update_status(bd);
return 0;
} }
static struct platform_driver aat2870_bl_driver = { static struct platform_driver aat2870_bl_driver = {
...@@ -195,7 +193,7 @@ static struct platform_driver aat2870_bl_driver = { ...@@ -195,7 +193,7 @@ static struct platform_driver aat2870_bl_driver = {
.name = "aat2870-backlight", .name = "aat2870-backlight",
}, },
.probe = aat2870_bl_probe, .probe = aat2870_bl_probe,
.remove = aat2870_bl_remove, .remove_new = aat2870_bl_remove,
}; };
static int __init aat2870_bl_init(void) static int __init aat2870_bl_init(void)
......
...@@ -337,7 +337,7 @@ static int adp5520_bl_probe(struct platform_device *pdev) ...@@ -337,7 +337,7 @@ static int adp5520_bl_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int adp5520_bl_remove(struct platform_device *pdev) static void adp5520_bl_remove(struct platform_device *pdev)
{ {
struct backlight_device *bl = platform_get_drvdata(pdev); struct backlight_device *bl = platform_get_drvdata(pdev);
struct adp5520_bl *data = bl_get_data(bl); struct adp5520_bl *data = bl_get_data(bl);
...@@ -347,8 +347,6 @@ static int adp5520_bl_remove(struct platform_device *pdev) ...@@ -347,8 +347,6 @@ static int adp5520_bl_remove(struct platform_device *pdev)
if (data->pdata->en_ambl_sens) if (data->pdata->en_ambl_sens)
sysfs_remove_group(&bl->dev.kobj, sysfs_remove_group(&bl->dev.kobj,
&adp5520_bl_attr_group); &adp5520_bl_attr_group);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -377,7 +375,7 @@ static struct platform_driver adp5520_bl_driver = { ...@@ -377,7 +375,7 @@ static struct platform_driver adp5520_bl_driver = {
.pm = &adp5520_bl_pm_ops, .pm = &adp5520_bl_pm_ops,
}, },
.probe = adp5520_bl_probe, .probe = adp5520_bl_probe,
.remove = adp5520_bl_remove, .remove_new = adp5520_bl_remove,
}; };
module_platform_driver(adp5520_bl_driver); module_platform_driver(adp5520_bl_driver);
......
...@@ -390,7 +390,7 @@ MODULE_DEVICE_TABLE(i2c, arcxcnn_ids); ...@@ -390,7 +390,7 @@ MODULE_DEVICE_TABLE(i2c, arcxcnn_ids);
static struct i2c_driver arcxcnn_driver = { static struct i2c_driver arcxcnn_driver = {
.driver = { .driver = {
.name = "arcxcnn_bl", .name = "arcxcnn_bl",
.of_match_table = of_match_ptr(arcxcnn_dt_ids), .of_match_table = arcxcnn_dt_ids,
}, },
.probe_new = arcxcnn_probe, .probe_new = arcxcnn_probe,
.remove = arcxcnn_remove, .remove = arcxcnn_remove,
......
...@@ -286,23 +286,23 @@ static int as3711_backlight_parse_dt(struct device *dev) ...@@ -286,23 +286,23 @@ static int as3711_backlight_parse_dt(struct device *dev)
if (ret < 0) if (ret < 0)
goto err_put_bl; goto err_put_bl;
if (of_find_property(bl, "su2-feedback-voltage", NULL)) { if (of_property_read_bool(bl, "su2-feedback-voltage")) {
pdata->su2_feedback = AS3711_SU2_VOLTAGE; pdata->su2_feedback = AS3711_SU2_VOLTAGE;
count++; count++;
} }
if (of_find_property(bl, "su2-feedback-curr1", NULL)) { if (of_property_read_bool(bl, "su2-feedback-curr1")) {
pdata->su2_feedback = AS3711_SU2_CURR1; pdata->su2_feedback = AS3711_SU2_CURR1;
count++; count++;
} }
if (of_find_property(bl, "su2-feedback-curr2", NULL)) { if (of_property_read_bool(bl, "su2-feedback-curr2")) {
pdata->su2_feedback = AS3711_SU2_CURR2; pdata->su2_feedback = AS3711_SU2_CURR2;
count++; count++;
} }
if (of_find_property(bl, "su2-feedback-curr3", NULL)) { if (of_property_read_bool(bl, "su2-feedback-curr3")) {
pdata->su2_feedback = AS3711_SU2_CURR3; pdata->su2_feedback = AS3711_SU2_CURR3;
count++; count++;
} }
if (of_find_property(bl, "su2-feedback-curr-auto", NULL)) { if (of_property_read_bool(bl, "su2-feedback-curr-auto")) {
pdata->su2_feedback = AS3711_SU2_CURR_AUTO; pdata->su2_feedback = AS3711_SU2_CURR_AUTO;
count++; count++;
} }
...@@ -312,19 +312,19 @@ static int as3711_backlight_parse_dt(struct device *dev) ...@@ -312,19 +312,19 @@ static int as3711_backlight_parse_dt(struct device *dev)
} }
count = 0; count = 0;
if (of_find_property(bl, "su2-fbprot-lx-sd4", NULL)) { if (of_property_read_bool(bl, "su2-fbprot-lx-sd4")) {
pdata->su2_fbprot = AS3711_SU2_LX_SD4; pdata->su2_fbprot = AS3711_SU2_LX_SD4;
count++; count++;
} }
if (of_find_property(bl, "su2-fbprot-gpio2", NULL)) { if (of_property_read_bool(bl, "su2-fbprot-gpio2")) {
pdata->su2_fbprot = AS3711_SU2_GPIO2; pdata->su2_fbprot = AS3711_SU2_GPIO2;
count++; count++;
} }
if (of_find_property(bl, "su2-fbprot-gpio3", NULL)) { if (of_property_read_bool(bl, "su2-fbprot-gpio3")) {
pdata->su2_fbprot = AS3711_SU2_GPIO3; pdata->su2_fbprot = AS3711_SU2_GPIO3;
count++; count++;
} }
if (of_find_property(bl, "su2-fbprot-gpio4", NULL)) { if (of_property_read_bool(bl, "su2-fbprot-gpio4")) {
pdata->su2_fbprot = AS3711_SU2_GPIO4; pdata->su2_fbprot = AS3711_SU2_GPIO4;
count++; count++;
} }
...@@ -334,15 +334,15 @@ static int as3711_backlight_parse_dt(struct device *dev) ...@@ -334,15 +334,15 @@ static int as3711_backlight_parse_dt(struct device *dev)
} }
count = 0; count = 0;
if (of_find_property(bl, "su2-auto-curr1", NULL)) { if (of_property_read_bool(bl, "su2-auto-curr1")) {
pdata->su2_auto_curr1 = true; pdata->su2_auto_curr1 = true;
count++; count++;
} }
if (of_find_property(bl, "su2-auto-curr2", NULL)) { if (of_property_read_bool(bl, "su2-auto-curr2")) {
pdata->su2_auto_curr2 = true; pdata->su2_auto_curr2 = true;
count++; count++;
} }
if (of_find_property(bl, "su2-auto-curr3", NULL)) { if (of_property_read_bool(bl, "su2-auto-curr3")) {
pdata->su2_auto_curr3 = true; pdata->su2_auto_curr3 = true;
count++; count++;
} }
......
...@@ -210,7 +210,7 @@ static int cr_backlight_probe(struct platform_device *pdev) ...@@ -210,7 +210,7 @@ static int cr_backlight_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int cr_backlight_remove(struct platform_device *pdev) static void cr_backlight_remove(struct platform_device *pdev)
{ {
struct cr_panel *crp = platform_get_drvdata(pdev); struct cr_panel *crp = platform_get_drvdata(pdev);
...@@ -220,13 +220,11 @@ static int cr_backlight_remove(struct platform_device *pdev) ...@@ -220,13 +220,11 @@ static int cr_backlight_remove(struct platform_device *pdev)
cr_backlight_set_intensity(crp->cr_backlight_device); cr_backlight_set_intensity(crp->cr_backlight_device);
cr_lcd_set_power(crp->cr_lcd_device, FB_BLANK_POWERDOWN); cr_lcd_set_power(crp->cr_lcd_device, FB_BLANK_POWERDOWN);
pci_dev_put(lpc_dev); pci_dev_put(lpc_dev);
return 0;
} }
static struct platform_driver cr_backlight_driver = { static struct platform_driver cr_backlight_driver = {
.probe = cr_backlight_probe, .probe = cr_backlight_probe,
.remove = cr_backlight_remove, .remove_new = cr_backlight_remove,
.driver = { .driver = {
.name = "cr_backlight", .name = "cr_backlight",
}, },
......
...@@ -135,7 +135,7 @@ static int da9052_backlight_probe(struct platform_device *pdev) ...@@ -135,7 +135,7 @@ static int da9052_backlight_probe(struct platform_device *pdev)
return da9052_adjust_wled_brightness(wleds); return da9052_adjust_wled_brightness(wleds);
} }
static int da9052_backlight_remove(struct platform_device *pdev) static void da9052_backlight_remove(struct platform_device *pdev)
{ {
struct backlight_device *bl = platform_get_drvdata(pdev); struct backlight_device *bl = platform_get_drvdata(pdev);
struct da9052_bl *wleds = bl_get_data(bl); struct da9052_bl *wleds = bl_get_data(bl);
...@@ -143,8 +143,6 @@ static int da9052_backlight_remove(struct platform_device *pdev) ...@@ -143,8 +143,6 @@ static int da9052_backlight_remove(struct platform_device *pdev)
wleds->brightness = 0; wleds->brightness = 0;
wleds->state = DA9052_WLEDS_OFF; wleds->state = DA9052_WLEDS_OFF;
da9052_adjust_wled_brightness(wleds); da9052_adjust_wled_brightness(wleds);
return 0;
} }
static const struct platform_device_id da9052_wled_ids[] = { static const struct platform_device_id da9052_wled_ids[] = {
...@@ -166,7 +164,7 @@ MODULE_DEVICE_TABLE(platform, da9052_wled_ids); ...@@ -166,7 +164,7 @@ MODULE_DEVICE_TABLE(platform, da9052_wled_ids);
static struct platform_driver da9052_wled_driver = { static struct platform_driver da9052_wled_driver = {
.probe = da9052_backlight_probe, .probe = da9052_backlight_probe,
.remove = da9052_backlight_remove, .remove_new = da9052_backlight_remove,
.id_table = da9052_wled_ids, .id_table = da9052_wled_ids,
.driver = { .driver = {
.name = "da9052-wled", .name = "da9052-wled",
......
...@@ -119,20 +119,18 @@ static int hp680bl_probe(struct platform_device *pdev) ...@@ -119,20 +119,18 @@ static int hp680bl_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int hp680bl_remove(struct platform_device *pdev) static void hp680bl_remove(struct platform_device *pdev)
{ {
struct backlight_device *bd = platform_get_drvdata(pdev); struct backlight_device *bd = platform_get_drvdata(pdev);
bd->props.brightness = 0; bd->props.brightness = 0;
bd->props.power = 0; bd->props.power = 0;
hp680bl_send_intensity(bd); hp680bl_send_intensity(bd);
return 0;
} }
static struct platform_driver hp680bl_driver = { static struct platform_driver hp680bl_driver = {
.probe = hp680bl_probe, .probe = hp680bl_probe,
.remove = hp680bl_remove, .remove_new = hp680bl_remove,
.driver = { .driver = {
.name = "hp680-bl", .name = "hp680-bl",
.pm = &hp680bl_pm_ops, .pm = &hp680bl_pm_ops,
......
...@@ -617,7 +617,7 @@ static int hx8357_probe(struct spi_device *spi) ...@@ -617,7 +617,7 @@ static int hx8357_probe(struct spi_device *spi)
return -EINVAL; return -EINVAL;
} }
if (of_find_property(spi->dev.of_node, "im-gpios", NULL)) { if (of_property_present(spi->dev.of_node, "im-gpios")) {
lcd->use_im_pins = 1; lcd->use_im_pins = 1;
for (i = 0; i < HX8357_NUM_IM_PINS; i++) { for (i = 0; i < HX8357_NUM_IM_PINS; i++) {
......
...@@ -217,7 +217,7 @@ static int led_bl_probe(struct platform_device *pdev) ...@@ -217,7 +217,7 @@ static int led_bl_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int led_bl_remove(struct platform_device *pdev) static void led_bl_remove(struct platform_device *pdev)
{ {
struct led_bl_data *priv = platform_get_drvdata(pdev); struct led_bl_data *priv = platform_get_drvdata(pdev);
struct backlight_device *bl = priv->bl_dev; struct backlight_device *bl = priv->bl_dev;
...@@ -228,8 +228,6 @@ static int led_bl_remove(struct platform_device *pdev) ...@@ -228,8 +228,6 @@ static int led_bl_remove(struct platform_device *pdev)
led_bl_power_off(priv); led_bl_power_off(priv);
for (i = 0; i < priv->nb_leds; i++) for (i = 0; i < priv->nb_leds; i++)
led_sysfs_enable(priv->leds[i]); led_sysfs_enable(priv->leds[i]);
return 0;
} }
static const struct of_device_id led_bl_of_match[] = { static const struct of_device_id led_bl_of_match[] = {
...@@ -245,7 +243,7 @@ static struct platform_driver led_bl_driver = { ...@@ -245,7 +243,7 @@ static struct platform_driver led_bl_driver = {
.of_match_table = of_match_ptr(led_bl_of_match), .of_match_table = of_match_ptr(led_bl_of_match),
}, },
.probe = led_bl_probe, .probe = led_bl_probe,
.remove = led_bl_remove, .remove_new = led_bl_remove,
}; };
module_platform_driver(led_bl_driver); module_platform_driver(led_bl_driver);
......
...@@ -337,7 +337,7 @@ static int lm3533_bl_probe(struct platform_device *pdev) ...@@ -337,7 +337,7 @@ static int lm3533_bl_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int lm3533_bl_remove(struct platform_device *pdev) static void lm3533_bl_remove(struct platform_device *pdev)
{ {
struct lm3533_bl *bl = platform_get_drvdata(pdev); struct lm3533_bl *bl = platform_get_drvdata(pdev);
struct backlight_device *bd = bl->bd; struct backlight_device *bd = bl->bd;
...@@ -349,8 +349,6 @@ static int lm3533_bl_remove(struct platform_device *pdev) ...@@ -349,8 +349,6 @@ static int lm3533_bl_remove(struct platform_device *pdev)
lm3533_ctrlbank_disable(&bl->cb); lm3533_ctrlbank_disable(&bl->cb);
sysfs_remove_group(&bd->dev.kobj, &lm3533_bl_attribute_group); sysfs_remove_group(&bd->dev.kobj, &lm3533_bl_attribute_group);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -390,7 +388,7 @@ static struct platform_driver lm3533_bl_driver = { ...@@ -390,7 +388,7 @@ static struct platform_driver lm3533_bl_driver = {
.pm = &lm3533_bl_pm_ops, .pm = &lm3533_bl_pm_ops,
}, },
.probe = lm3533_bl_probe, .probe = lm3533_bl_probe,
.remove = lm3533_bl_remove, .remove_new = lm3533_bl_remove,
.shutdown = lm3533_bl_shutdown, .shutdown = lm3533_bl_shutdown,
}; };
module_platform_driver(lm3533_bl_driver); module_platform_driver(lm3533_bl_driver);
......
...@@ -548,7 +548,7 @@ static void lp855x_remove(struct i2c_client *cl) ...@@ -548,7 +548,7 @@ static void lp855x_remove(struct i2c_client *cl)
sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group); sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group);
} }
static const struct of_device_id lp855x_dt_ids[] = { static const struct of_device_id lp855x_dt_ids[] __maybe_unused = {
{ .compatible = "ti,lp8550", }, { .compatible = "ti,lp8550", },
{ .compatible = "ti,lp8551", }, { .compatible = "ti,lp8551", },
{ .compatible = "ti,lp8552", }, { .compatible = "ti,lp8552", },
......
...@@ -298,7 +298,7 @@ static int lp8788_backlight_probe(struct platform_device *pdev) ...@@ -298,7 +298,7 @@ static int lp8788_backlight_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int lp8788_backlight_remove(struct platform_device *pdev) static void lp8788_backlight_remove(struct platform_device *pdev)
{ {
struct lp8788_bl *bl = platform_get_drvdata(pdev); struct lp8788_bl *bl = platform_get_drvdata(pdev);
struct backlight_device *bl_dev = bl->bl_dev; struct backlight_device *bl_dev = bl->bl_dev;
...@@ -307,13 +307,11 @@ static int lp8788_backlight_remove(struct platform_device *pdev) ...@@ -307,13 +307,11 @@ static int lp8788_backlight_remove(struct platform_device *pdev)
backlight_update_status(bl_dev); backlight_update_status(bl_dev);
sysfs_remove_group(&pdev->dev.kobj, &lp8788_attr_group); sysfs_remove_group(&pdev->dev.kobj, &lp8788_attr_group);
lp8788_backlight_unregister(bl); lp8788_backlight_unregister(bl);
return 0;
} }
static struct platform_driver lp8788_bl_driver = { static struct platform_driver lp8788_bl_driver = {
.probe = lp8788_backlight_probe, .probe = lp8788_backlight_probe,
.remove = lp8788_backlight_remove, .remove_new = lp8788_backlight_remove,
.driver = { .driver = {
.name = LP8788_DEV_BACKLIGHT, .name = LP8788_DEV_BACKLIGHT,
}, },
......
...@@ -318,15 +318,13 @@ static int mt6370_bl_probe(struct platform_device *pdev) ...@@ -318,15 +318,13 @@ static int mt6370_bl_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int mt6370_bl_remove(struct platform_device *pdev) static void mt6370_bl_remove(struct platform_device *pdev)
{ {
struct mt6370_priv *priv = platform_get_drvdata(pdev); struct mt6370_priv *priv = platform_get_drvdata(pdev);
struct backlight_device *bl_dev = priv->bl; struct backlight_device *bl_dev = priv->bl;
bl_dev->props.brightness = 0; bl_dev->props.brightness = 0;
backlight_update_status(priv->bl); backlight_update_status(priv->bl);
return 0;
} }
static const struct of_device_id mt6370_bl_of_match[] = { static const struct of_device_id mt6370_bl_of_match[] = {
...@@ -342,7 +340,7 @@ static struct platform_driver mt6370_bl_driver = { ...@@ -342,7 +340,7 @@ static struct platform_driver mt6370_bl_driver = {
.of_match_table = mt6370_bl_of_match, .of_match_table = mt6370_bl_of_match,
}, },
.probe = mt6370_bl_probe, .probe = mt6370_bl_probe,
.remove = mt6370_bl_remove, .remove_new = mt6370_bl_remove,
}; };
module_platform_driver(mt6370_bl_driver); module_platform_driver(mt6370_bl_driver);
......
...@@ -625,7 +625,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) ...@@ -625,7 +625,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int pwm_backlight_remove(struct platform_device *pdev) static void pwm_backlight_remove(struct platform_device *pdev)
{ {
struct backlight_device *bl = platform_get_drvdata(pdev); struct backlight_device *bl = platform_get_drvdata(pdev);
struct pwm_bl_data *pb = bl_get_data(bl); struct pwm_bl_data *pb = bl_get_data(bl);
...@@ -635,8 +635,6 @@ static int pwm_backlight_remove(struct platform_device *pdev) ...@@ -635,8 +635,6 @@ static int pwm_backlight_remove(struct platform_device *pdev)
if (pb->exit) if (pb->exit)
pb->exit(&pdev->dev); pb->exit(&pdev->dev);
return 0;
} }
static void pwm_backlight_shutdown(struct platform_device *pdev) static void pwm_backlight_shutdown(struct platform_device *pdev)
...@@ -690,7 +688,7 @@ static struct platform_driver pwm_backlight_driver = { ...@@ -690,7 +688,7 @@ static struct platform_driver pwm_backlight_driver = {
.of_match_table = of_match_ptr(pwm_backlight_of_match), .of_match_table = of_match_ptr(pwm_backlight_of_match),
}, },
.probe = pwm_backlight_probe, .probe = pwm_backlight_probe,
.remove = pwm_backlight_remove, .remove_new = pwm_backlight_remove,
.shutdown = pwm_backlight_shutdown, .shutdown = pwm_backlight_shutdown,
}; };
......
...@@ -1717,7 +1717,7 @@ static int wled_probe(struct platform_device *pdev) ...@@ -1717,7 +1717,7 @@ static int wled_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(bl); return PTR_ERR_OR_ZERO(bl);
}; };
static int wled_remove(struct platform_device *pdev) static void wled_remove(struct platform_device *pdev)
{ {
struct wled *wled = platform_get_drvdata(pdev); struct wled *wled = platform_get_drvdata(pdev);
...@@ -1725,12 +1725,11 @@ static int wled_remove(struct platform_device *pdev) ...@@ -1725,12 +1725,11 @@ static int wled_remove(struct platform_device *pdev)
cancel_delayed_work_sync(&wled->ovp_work); cancel_delayed_work_sync(&wled->ovp_work);
disable_irq(wled->short_irq); disable_irq(wled->short_irq);
disable_irq(wled->ovp_irq); disable_irq(wled->ovp_irq);
return 0;
} }
static const struct of_device_id wled_match_table[] = { static const struct of_device_id wled_match_table[] = {
{ .compatible = "qcom,pm8941-wled", .data = (void *)3 }, { .compatible = "qcom,pm8941-wled", .data = (void *)3 },
{ .compatible = "qcom,pmi8950-wled", .data = (void *)4 },
{ .compatible = "qcom,pmi8994-wled", .data = (void *)4 }, { .compatible = "qcom,pmi8994-wled", .data = (void *)4 },
{ .compatible = "qcom,pmi8998-wled", .data = (void *)4 }, { .compatible = "qcom,pmi8998-wled", .data = (void *)4 },
{ .compatible = "qcom,pm660l-wled", .data = (void *)4 }, { .compatible = "qcom,pm660l-wled", .data = (void *)4 },
...@@ -1742,7 +1741,7 @@ MODULE_DEVICE_TABLE(of, wled_match_table); ...@@ -1742,7 +1741,7 @@ MODULE_DEVICE_TABLE(of, wled_match_table);
static struct platform_driver wled_driver = { static struct platform_driver wled_driver = {
.probe = wled_probe, .probe = wled_probe,
.remove = wled_remove, .remove_new = wled_remove,
.driver = { .driver = {
.name = "qcom,wled", .name = "qcom,wled",
.of_match_table = wled_match_table, .of_match_table = wled_match_table,
......
...@@ -203,15 +203,13 @@ static int rt4831_bl_probe(struct platform_device *pdev) ...@@ -203,15 +203,13 @@ static int rt4831_bl_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int rt4831_bl_remove(struct platform_device *pdev) static void rt4831_bl_remove(struct platform_device *pdev)
{ {
struct rt4831_priv *priv = platform_get_drvdata(pdev); struct rt4831_priv *priv = platform_get_drvdata(pdev);
struct backlight_device *bl_dev = priv->bl; struct backlight_device *bl_dev = priv->bl;
bl_dev->props.brightness = 0; bl_dev->props.brightness = 0;
backlight_update_status(priv->bl); backlight_update_status(priv->bl);
return 0;
} }
static const struct of_device_id __maybe_unused rt4831_bl_of_match[] = { static const struct of_device_id __maybe_unused rt4831_bl_of_match[] = {
...@@ -226,7 +224,7 @@ static struct platform_driver rt4831_bl_driver = { ...@@ -226,7 +224,7 @@ static struct platform_driver rt4831_bl_driver = {
.of_match_table = rt4831_bl_of_match, .of_match_table = rt4831_bl_of_match,
}, },
.probe = rt4831_bl_probe, .probe = rt4831_bl_probe,
.remove = rt4831_bl_remove, .remove_new = rt4831_bl_remove,
}; };
module_platform_driver(rt4831_bl_driver); module_platform_driver(rt4831_bl_driver);
......
...@@ -311,7 +311,7 @@ static int sky81452_bl_probe(struct platform_device *pdev) ...@@ -311,7 +311,7 @@ static int sky81452_bl_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int sky81452_bl_remove(struct platform_device *pdev) static void sky81452_bl_remove(struct platform_device *pdev)
{ {
const struct sky81452_bl_platform_data *pdata = const struct sky81452_bl_platform_data *pdata =
dev_get_platdata(&pdev->dev); dev_get_platdata(&pdev->dev);
...@@ -325,8 +325,6 @@ static int sky81452_bl_remove(struct platform_device *pdev) ...@@ -325,8 +325,6 @@ static int sky81452_bl_remove(struct platform_device *pdev)
if (pdata->gpiod_enable) if (pdata->gpiod_enable)
gpiod_set_value_cansleep(pdata->gpiod_enable, 0); gpiod_set_value_cansleep(pdata->gpiod_enable, 0);
return 0;
} }
#ifdef CONFIG_OF #ifdef CONFIG_OF
...@@ -343,7 +341,7 @@ static struct platform_driver sky81452_bl_driver = { ...@@ -343,7 +341,7 @@ static struct platform_driver sky81452_bl_driver = {
.of_match_table = of_match_ptr(sky81452_bl_of_match), .of_match_table = of_match_ptr(sky81452_bl_of_match),
}, },
.probe = sky81452_bl_probe, .probe = sky81452_bl_probe,
.remove = sky81452_bl_remove, .remove_new = sky81452_bl_remove,
}; };
module_platform_driver(sky81452_bl_driver); module_platform_driver(sky81452_bl_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment