summaryrefslogtreecommitdiffstats
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-01-22 13:45:38 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 10:37:11 -0800
commit2943ecf2ed32632473c06f1975db47a7aa98c10f (patch)
tree94bbae37d42f3e03fd8fc4a86767f5815a1318fb /include/linux/spi/spi.h
parent873733188a019acdb7fa253011cbdc0a8afd97f3 (diff)
downloadblackbird-op-linux-2943ecf2ed32632473c06f1975db47a7aa98c10f.tar.gz
blackbird-op-linux-2943ecf2ed32632473c06f1975db47a7aa98c10f.zip
Driver core: convert SPI code to use struct device
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Cc: <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 176f6e36dbfa..8c2edd82a073 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -170,7 +170,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
* message's completion function when the transaction completes.
*/
struct spi_master {
- struct class_device cdev;
+ struct device dev;
/* other than negative (== assign one dynamically), bus_num is fully
* board-specific. usually that simplifies to being SOC-specific.
@@ -216,17 +216,17 @@ struct spi_master {
static inline void *spi_master_get_devdata(struct spi_master *master)
{
- return class_get_devdata(&master->cdev);
+ return dev_get_drvdata(&master->dev);
}
static inline void spi_master_set_devdata(struct spi_master *master, void *data)
{
- class_set_devdata(&master->cdev, data);
+ dev_set_drvdata(&master->dev, data);
}
static inline struct spi_master *spi_master_get(struct spi_master *master)
{
- if (!master || !class_device_get(&master->cdev))
+ if (!master || !get_device(&master->dev))
return NULL;
return master;
}
@@ -234,7 +234,7 @@ static inline struct spi_master *spi_master_get(struct spi_master *master)
static inline void spi_master_put(struct spi_master *master)
{
if (master)
- class_device_put(&master->cdev);
+ put_device(&master->dev);
}
OpenPOWER on IntegriCloud