aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-02-08 00:34:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-08 00:34:08 -0500
commit07b2463046247ce580ff9b37e91394f2f6424768 (patch)
tree6f6e79f132a2580c455a533f864492f0b34e54e2 /include/linux/spi
parentc4184f117af7441fb83bc413d2214d92920e0289 (diff)
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/linux/spi')
-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 8c2edd82a07..176f6e36dbf 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)
170 * message's completion function when the transaction completes. 170 * message's completion function when the transaction completes.
171 */ 171 */
172struct spi_master { 172struct spi_master {
173 struct device dev; 173 struct class_device cdev;
174 174
175 /* other than negative (== assign one dynamically), bus_num is fully 175 /* other than negative (== assign one dynamically), bus_num is fully
176 * board-specific. usually that simplifies to being SOC-specific. 176 * board-specific. usually that simplifies to being SOC-specific.
@@ -216,17 +216,17 @@ struct spi_master {
216 216
217static inline void *spi_master_get_devdata(struct spi_master *master) 217static inline void *spi_master_get_devdata(struct spi_master *master)
218{ 218{
219 return dev_get_drvdata(&master->dev); 219 return class_get_devdata(&master->cdev);
220} 220}
221 221
222static inline void spi_master_set_devdata(struct spi_master *master, void *data) 222static inline void spi_master_set_devdata(struct spi_master *master, void *data)
223{ 223{
224 dev_set_drvdata(&master->dev, data); 224 class_set_devdata(&master->cdev, data);
225} 225}
226 226
227static inline struct spi_master *spi_master_get(struct spi_master *master) 227static inline struct spi_master *spi_master_get(struct spi_master *master)
228{ 228{
229 if (!master || !get_device(&master->dev)) 229 if (!master || !class_device_get(&master->cdev))
230 return NULL; 230 return NULL;
231 return master; 231 return master;
232} 232}
@@ -234,7 +234,7 @@ static inline struct spi_master *spi_master_get(struct spi_master *master)
234static inline void spi_master_put(struct spi_master *master) 234static inline void spi_master_put(struct spi_master *master)
235{ 235{
236 if (master) 236 if (master)
237 put_device(&master->dev); 237 class_device_put(&master->cdev);
238} 238}
239 239
240 240