a0e745bc363200e4326cc1c814cc8cb0d7d51f05
[openwrt/staging/blogic.git] /
1 From 2d0958a56e6b0da1510ed86f4fb7409b43fedb4d Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 11 Feb 2021 18:46:06 +0000
4 Subject: [PATCH] regulator: rpi-panel: Register with a unique
5 backlight name
6
7 There's no reason why 2 Raspberry Pi DSI displays can't be
8 attached to a Pi Compute Module, so the backlight names need to
9 be unique.
10
11 Use the parent dev_name. It's not as readable, but is unique.
12
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
14 ---
15 drivers/regulator/rpi-panel-attiny-regulator.c | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18 --- a/drivers/regulator/rpi-panel-attiny-regulator.c
19 +++ b/drivers/regulator/rpi-panel-attiny-regulator.c
20 @@ -217,8 +217,7 @@ static int attiny_i2c_probe(struct i2c_c
21
22 props.type = BACKLIGHT_RAW;
23 props.max_brightness = 0xff;
24 - bl = devm_backlight_device_register(&i2c->dev,
25 - "7inch-touchscreen-panel-bl",
26 + bl = devm_backlight_device_register(&i2c->dev, dev_name(&i2c->dev),
27 &i2c->dev, regmap, &attiny_bl,
28 &props);
29 if (IS_ERR(bl))