Skip to contentSkip to conversation

[2.6.18] resend of spi set kset of master class dev explicitly

PATCH New Hans-Christian Egtvedt 1 participant 1 message Oct 19, 2006 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [2.6.18] resend of spi set kset of master class dev explicitly

Hello,

<quote Imre Deak from Thu, 12 Jan 2006 21:18:54 +0200>
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.
</quote>

Patch is updated to match the 2.6.18 kernel.

Signature · 4 lines
With kind regards,

Hans-Christian Egtvedt
Applications Engineer - AVR Applications Lab
drivers/spi/spi.c +1 -0
@@ -367,6 +367,7 @@ spi_alloc_master(struct device *dev, uns
 
 	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]);