diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-08-08 16:21:02 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-08-08 16:21:02 -0400 |
| commit | e4ddcb0a6bf04d53ce77b4eb87bbbb32c4261d11 (patch) | |
| tree | d27d2fea50a384d97aa2d0cf5c8657c916f761d4 /include/linux/spi/spi.h | |
| parent | f2afa7711f8585ffc088ba538b9a510e0d5dca12 (diff) | |
| parent | 6e86841d05f371b5b9b86ce76c02aaee83352298 (diff) | |
Merge commit 'v2.6.27-rc1' into for-linus
Diffstat (limited to 'include/linux/spi/spi.h')
| -rw-r--r-- | include/linux/spi/spi.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 387e428f1cdf..4be01bb44377 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -82,7 +82,7 @@ struct spi_device { | |||
| 82 | int irq; | 82 | int irq; |
| 83 | void *controller_state; | 83 | void *controller_state; |
| 84 | void *controller_data; | 84 | void *controller_data; |
| 85 | const char *modalias; | 85 | char modalias[32]; |
| 86 | 86 | ||
| 87 | /* | 87 | /* |
| 88 | * likely need more hooks for more protocol options affecting how | 88 | * likely need more hooks for more protocol options affecting how |
| @@ -733,7 +733,7 @@ struct spi_board_info { | |||
| 733 | * controller_data goes to spi_device.controller_data, | 733 | * controller_data goes to spi_device.controller_data, |
| 734 | * irq is copied too | 734 | * irq is copied too |
| 735 | */ | 735 | */ |
| 736 | char modalias[KOBJ_NAME_LEN]; | 736 | char modalias[32]; |
| 737 | const void *platform_data; | 737 | const void *platform_data; |
| 738 | void *controller_data; | 738 | void *controller_data; |
| 739 | int irq; | 739 | int irq; |
| @@ -778,8 +778,20 @@ spi_register_board_info(struct spi_board_info const *info, unsigned n) | |||
| 778 | * use spi_new_device() to describe each device. You can also call | 778 | * use spi_new_device() to describe each device. You can also call |
| 779 | * spi_unregister_device() to start making that device vanish, but | 779 | * spi_unregister_device() to start making that device vanish, but |
| 780 | * normally that would be handled by spi_unregister_master(). | 780 | * normally that would be handled by spi_unregister_master(). |
| 781 | * | ||
| 782 | * You can also use spi_alloc_device() and spi_add_device() to use a two | ||
| 783 | * stage registration sequence for each spi_device. This gives the caller | ||
| 784 | * some more control over the spi_device structure before it is registered, | ||
| 785 | * but requires that caller to initialize fields that would otherwise | ||
| 786 | * be defined using the board info. | ||
| 781 | */ | 787 | */ |
| 782 | extern struct spi_device * | 788 | extern struct spi_device * |
| 789 | spi_alloc_device(struct spi_master *master); | ||
| 790 | |||
| 791 | extern int | ||
| 792 | spi_add_device(struct spi_device *spi); | ||
| 793 | |||
| 794 | extern struct spi_device * | ||
| 783 | spi_new_device(struct spi_master *, struct spi_board_info *); | 795 | spi_new_device(struct spi_master *, struct spi_board_info *); |
| 784 | 796 | ||
| 785 | static inline void | 797 | static inline void |
