diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-08 08:34:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-08 08:34:08 +0300 |
commit | 07b2463046247ce580ff9b37e91394f2f6424768 (patch) | |
tree | 6f6e79f132a2580c455a533f864492f0b34e54e2 /include | |
parent | c4184f117af7441fb83bc413d2214d92920e0289 (diff) | |
download | linux-07b2463046247ce580ff9b37e91394f2f6424768.tar.xz |
Revert "Driver core: convert SPI code to use struct device"
This reverts commit 2943ecf2ed32632473c06f1975db47a7aa98c10f.
This should go through the SPI maintainer, it was my fault that it did
not. Especially as it conflicts with other patches he has pending.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/spi/spi.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 8c2edd82a073..176f6e36dbfa 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 device dev; + struct class_device cdev; /* 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 dev_get_drvdata(&master->dev); + return class_get_devdata(&master->cdev); } static inline void spi_master_set_devdata(struct spi_master *master, void *data) { - dev_set_drvdata(&master->dev, data); + class_set_devdata(&master->cdev, data); } static inline struct spi_master *spi_master_get(struct spi_master *master) { - if (!master || !get_device(&master->dev)) + if (!master || !class_device_get(&master->cdev)) 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) - put_device(&master->dev); + class_device_put(&master->cdev); } |