X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fspi%2Fspi.h;h=387e428f1cdf233ab3b54b078ba34b20157b2e37;hb=0ba6c33bcddc64a54b5f1c25a696c4767dc76292;hp=002a3cddbdd5b0bede9f6ba9f653623801bc8742;hpb=0d6caa1795090bd22ede96b84daa4600b63eee37;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 002a3cddbdd..387e428f1cd 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -195,7 +195,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) /** * struct spi_master - interface to SPI master controller - * @cdev: class interface to this driver + * @dev: device interface to this driver * @bus_num: board-specific (and often SOC-specific) identifier for a * given SPI controller. * @num_chipselect: chipselects are used to distinguish individual @@ -222,7 +222,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. @@ -268,17 +268,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; } @@ -286,7 +286,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); }