Skip to contentSkip to conversation

spi: Mark spi_register_board_info() __devinit

PATCH Applied Mark Brown 2 participants 2 messages Feb 18, 2012 – Mar 9, 2012 1 message not in the archive SPI

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 spi: Mark spi_register_board_info() __devinit

Some systems have SPI devices located on plugin modules which are enumerated at runtime as devices. The drivers for these plugin modules need to register their SPI devices at probe() time so want to be able to call spi_register_board_info() but that function is currently marked as __init rather than __devinit so this usage isn't legal. Change the annotation to __devinit to handle this.

---
 drivers/spi/spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/spi.c +1 -1
index 909e303..0c833a9 100644
@@ -484,7 +484,7 @@ static void spi_match_master_to_boardinfo(struct spi_master *master,
  * The board info passed can safely be __initdata ... but be careful of
  * any embedded pointers (platform_data, etc), they're copied as-is.
  */
-int __init
+int __devinit
 spi_register_board_info(struct spi_board_info const *info, unsigned n)
 {
 	struct boardinfo *bi;
Signature · 8 lines
1.7.9


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

A message that is not in the archive (sent off-list or not yet received): 1329524609-1777-1-git-send-email-broonie-yzvPICuk2AATkU/[email protected]

Applied
#2 lore raw
Quoted 8 lines · Mark Brown

Some systems have SPI devices located on plugin modules which are enumerated at runtime as devices. The drivers for these plugin modules need to register their SPI devices at probe() time so want to be able to call spi_register_board_info() but that function is currently marked as __init rather than __devinit so this usage isn't legal. Change the annotation to __devinit to handle this.

Applied, thanks.

g.

Quoted 20 lines
---
 drivers/spi/spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/spi.c +1 -1
index 909e303..0c833a9 100644
@@ -484,7 +484,7 @@ static void spi_match_master_to_boardinfo(struct spi_master *master,
  * The board info passed can safely be __initdata ... but be careful of
  * any embedded pointers (platform_data, etc), they're copied as-is.
  */
-int __init
+int __devinit
 spi_register_board_info(struct spi_board_info const *info, unsigned n)
 {
 	struct boardinfo *bi;
Signature · 1 line
1.7.9
Signature · 8 lines
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/