summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem/bcm-ocotp.c
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2020-09-19 20:03:00 +0200
committerPavel Machek <pavel@ucw.cz>2020-09-26 21:56:43 +0200
commit5c0d20a968ae878ccdb2a42a0438610cf02cff13 (patch)
tree29dace6fce53f2f823efe65e18d0ec001e49175e /drivers/nvmem/bcm-ocotp.c
parent484456712de44c516b016b23027ad500acac4d29 (diff)
downloadlinux-5c0d20a968ae878ccdb2a42a0438610cf02cff13.tar.bz2
leds: lm36274: use platform device as parent of LED
Instead of registering LED under the MFD device, this driver sets the parent of the LED it is registering to the parent of the MFD device (the I2C client device). Because of this we cannot use devres for LED registration, since it can result in use-after-free, see commit a0972fff0947 ("leds: lm36274: fix use-after-free on unbind"). The only other in-tree driver that also registers under the MFD device (drivers/regulator/lm363x-regulator.c) sets the parent to the MFD device. Set the parent of this LED to the MFD device, instead of the I2C client device. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/nvmem/bcm-ocotp.c')
0 files changed, 0 insertions, 0 deletions