aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-12-05 22:38:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-10 13:03:32 -0500
commitcba767175becadc5c4016cceb7bfdd2c7fe722f4 (patch)
tree3e7fdc76e7abfa6237517bc0f3a8317cc623a508 /drivers/block
parentcdcb30b5cca157ff73892900ac309d5ee4151c04 (diff)
pktcdvd: remove broken dev_t export of class devices
The pktcdvd created class devices only export some sysfs files, but have no char dev_t registered in the driver. At class device creation time they copy the dev_t value of the block device to the char device, wich will register a new char device in the driver core and userspace, with a conflicting dev_t value. In many cases the class devices dev_t just points to a random USB device. This fixes the sysfs "duplicate entry" errors. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Peter Osterlund <petero2@telia.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/pktcdvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index edda7b6b077b..dc7a8c352da2 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -302,7 +302,7 @@ static struct kobj_type kobj_pkt_type_wqueue = {
302static void pkt_sysfs_dev_new(struct pktcdvd_device *pd) 302static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
303{ 303{
304 if (class_pktcdvd) { 304 if (class_pktcdvd) {
305 pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL, 305 pd->dev = device_create(class_pktcdvd, NULL, MKDEV(0, 0), NULL,
306 "%s", pd->name); 306 "%s", pd->name);
307 if (IS_ERR(pd->dev)) 307 if (IS_ERR(pd->dev))
308 pd->dev = NULL; 308 pd->dev = NULL;