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>
Wed, 13 Oct 2021 12:27:54 +0000 (14:27 +0200)
commit2ab189164056b05474275bb40caa038a37713061
tree150bdb6d19f26da4d396cefb3ff0d1596d854a92
parent56578ab25a88c7192e25c99f679ccde37edbd59d
staging: most: dim2: do not double-register the same device

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>
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