Commit d7b3ffe2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ static int aat2870_bl_probe(struct platform_device *pdev)
	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 backlight_device *bd = aat2870_bl->bd;
@@ -186,8 +186,6 @@ static int aat2870_bl_remove(struct platform_device *pdev)
	bd->props.power = FB_BLANK_POWERDOWN;
	bd->props.brightness = 0;
	backlight_update_status(bd);

	return 0;
}

static struct platform_driver aat2870_bl_driver = {
@@ -195,7 +193,7 @@ static struct platform_driver aat2870_bl_driver = {
		.name	= "aat2870-backlight",
	},
	.probe		= aat2870_bl_probe,
	.remove		= aat2870_bl_remove,
	.remove_new	= aat2870_bl_remove,
};

static int __init aat2870_bl_init(void)
+2 −4
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ static int adp5520_bl_probe(struct platform_device *pdev)
	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 adp5520_bl *data = bl_get_data(bl);
@@ -347,8 +347,6 @@ static int adp5520_bl_remove(struct platform_device *pdev)
	if (data->pdata->en_ambl_sens)
		sysfs_remove_group(&bl->dev.kobj,
				&adp5520_bl_attr_group);

	return 0;
}

#ifdef CONFIG_PM_SLEEP
@@ -377,7 +375,7 @@ static struct platform_driver adp5520_bl_driver = {
		.pm	= &adp5520_bl_pm_ops,
	},
	.probe		= adp5520_bl_probe,
	.remove		= adp5520_bl_remove,
	.remove_new	= adp5520_bl_remove,
};

module_platform_driver(adp5520_bl_driver);
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ MODULE_DEVICE_TABLE(i2c, arcxcnn_ids);
static struct i2c_driver arcxcnn_driver = {
	.driver = {
		.name = "arcxcnn_bl",
		.of_match_table = of_match_ptr(arcxcnn_dt_ids),
		.of_match_table = arcxcnn_dt_ids,
	},
	.probe_new = arcxcnn_probe,
	.remove = arcxcnn_remove,
+12 −12
Original line number Diff line number Diff line
@@ -286,23 +286,23 @@ static int as3711_backlight_parse_dt(struct device *dev)
		if (ret < 0)
			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;
			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;
			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;
			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;
			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;
			count++;
		}
@@ -312,19 +312,19 @@ static int as3711_backlight_parse_dt(struct device *dev)
		}

		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;
			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;
			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;
			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;
			count++;
		}
@@ -334,15 +334,15 @@ static int as3711_backlight_parse_dt(struct device *dev)
		}

		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;
			count++;
		}
		if (of_find_property(bl, "su2-auto-curr2", NULL)) {
		if (of_property_read_bool(bl, "su2-auto-curr2")) {
			pdata->su2_auto_curr2 = true;
			count++;
		}
		if (of_find_property(bl, "su2-auto-curr3", NULL)) {
		if (of_property_read_bool(bl, "su2-auto-curr3")) {
			pdata->su2_auto_curr3 = true;
			count++;
		}
+2 −4
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ static int cr_backlight_probe(struct platform_device *pdev)
	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);

@@ -220,13 +220,11 @@ static int cr_backlight_remove(struct platform_device *pdev)
	cr_backlight_set_intensity(crp->cr_backlight_device);
	cr_lcd_set_power(crp->cr_lcd_device, FB_BLANK_POWERDOWN);
	pci_dev_put(lpc_dev);

	return 0;
}

static struct platform_driver cr_backlight_driver = {
	.probe = cr_backlight_probe,
	.remove = cr_backlight_remove,
	.remove_new = cr_backlight_remove,
	.driver = {
		   .name = "cr_backlight",
		   },
Loading