staging: most: dim2: do not double-register the same device
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Mon, 11 Oct 2021 06:11:18 +0000 (09:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:52 +0000 (19:16 +0100)
commitab206dd351488f7bf6c7dfc901f08e78eb278059
tree419b24a0ccb217138d907be3283cfb263f705923
parentf1401c37fee26268a76ac8391d661b7c881fde9b
staging: most: dim2: do not double-register the same device

[ Upstream commit 2ab189164056b05474275bb40caa038a37713061 ]

Commit 723de0f9171e ("staging: most: remove device from interface
structure") moved registration of driver-provided struct device to
the most subsystem.

Dim2 used to register the same struct device to provide a custom device
attribute. This causes double-registration of the same struct device.

Fix that by moving the custom attribute to driver's dev_groups.
This moves attribute to the platform_device object, which is a better
location for platform-specific attributes anyway.

Fixes: 723de0f9171e ("staging: most: remove device from interface structure")
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20211011061117.21435-1-nikita.yoush@cogentembedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/most/dim2/Makefile
drivers/staging/most/dim2/dim2.c
drivers/staging/most/dim2/sysfs.c [deleted file]
drivers/staging/most/dim2/sysfs.h