From: Hans-Christian Egtvedt Date: Thu, 7 Dec 2006 04:36:19 +0000 (-0800) Subject: [PATCH] spi: set kset of master class dev explicitly X-Git-Tag: v2.6.20-rc1~145^2^2~209 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3bd0f6943520e459659d10f3282285e43d3990f1;p=linux-2.6-omap-h63xx.git [PATCH] spi: set kset of master class dev explicitly In order for spi_busnum_to_master to work spi master devices must be linked into the spi_master_class.subsys.kset list. At the moment the default class_obj_subsys.kset is used and we can't enumerate the master devices. Signed-off-by: Hans-Christian Egtvedt Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 7d215eaa137..270e6211c2e 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -366,6 +366,7 @@ spi_alloc_master(struct device *dev, unsigned size) class_device_initialize(&master->cdev); master->cdev.class = &spi_master_class; + kobj_set_kset_s(&master->cdev, spi_master_class.subsys); master->cdev.dev = get_device(dev); spi_master_set_devdata(master, &master[1]);