[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160630015953.6888-8-famz@redhat.com>
Date: Thu, 30 Jun 2016 09:59:48 +0800
From: Fam Zheng <famz@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Jens Axboe <axboe@...nel.dk>,
"Ed L. Cashin" <ed.cashin@....org>, Jiri Kosina <jikos@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Shaohua Li <shli@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Keith Busch <keith.busch@...el.com>,
linuxppc-dev@...ts.ozlabs.org, linux-block@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-raid@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-mtd@...ts.infradead.org, linux-nvme@...ts.infradead.org,
Christoph Hellwig <hch@...radead.org>, famz@...hat.com
Subject: [PATCH v2 07/12] pktcdvd: Generate uevent after attribute available
It is documented that KOBJ_ADD should be generated after the object's
attributes and children are ready. We can achieve this with the new
disk_gen_uevents interface.
Signed-off-by: Fam Zheng <famz@...hat.com>
---
drivers/block/pktcdvd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 00928406..a4e6bb7 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2785,11 +2785,13 @@ static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
disk->events = pd->bdev->bd_disk->events;
disk->async_events = pd->bdev->bd_disk->async_events;
- add_disk(disk, true);
+ add_disk(disk, false);
pkt_sysfs_dev_new(pd);
pkt_debugfs_dev_new(pd);
+ disk_gen_uevents(disk);
+
pkt_devs[idx] = pd;
if (pkt_dev)
*pkt_dev = pd->pkt_dev;
--
2.9.0
Powered by blists - more mailing lists