Skip to content

Commit

Permalink
[PATCH] spi: set kset of master class dev explicitly
Browse files Browse the repository at this point in the history
<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>

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Hans-Christian Egtvedt authored and Linus Torvalds committed Dec 7, 2006
1 parent 4740d38 commit 3bd0f69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit 3bd0f69

Please sign in to comment.