pktcdvd: convert to use attribute groups
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jan 2022 16:24:08 +0000 (17:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Jan 2022 04:24:34 +0000 (21:24 -0700)
commitd5dbcca70182501bed99de85c224cef04c38ed92
tree6d37b9f276c5963926fb370d47fb684e4b521c79
parent498860df8edc069ba63449891e531706594f6791
pktcdvd: convert to use attribute groups

There is no need to create kobject children of the pktcdvd device just
to display a subdirectory name.  Instead, use a named attribute group
which removes the extra kobjects and also fixes the userspace race where
the device is created yet tools like libudev can not see the attributes
as they think the subdirectories are some other sort of device.

Cc: linux-block@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220103162408.742003-1-gregkh@linuxfoundation.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c
include/linux/pktcdvd.h