diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-10-15 05:30:28 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-10-24 12:08:48 -0400 |
commit | 302090a66b85bb82023b07a715f9c9a347be2ac8 (patch) | |
tree | abaefce04370dad8d0bf67caf2bfbbd594aaeb10 /arch/arm/mach-at91/at91sam9261_devices.c | |
parent | 7840487cd6298f9f931103b558290d8d98d41c49 (diff) |
ARM: at91/i2c: change id to let i2c-at91 work
The i2c core driver will turn the platform device ID to busnum
When using platfrom device ID as -1, it means dynamically assigned
the busnum. When writing code, we need to make sure the busnum,
and call i2c_register_board_info(int busnum, ...) to register device
if using -1, we do not know the value of busnum
In order to solve this issue, set the platform device ID as a fix number
Here using 0 to match the busnum used in i2c_regsiter_board_info()
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 0256a007d1bd..b9487696b7be 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -317,7 +317,7 @@ static struct resource twi_resources[] = { | |||
317 | }; | 317 | }; |
318 | 318 | ||
319 | static struct platform_device at91sam9261_twi_device = { | 319 | static struct platform_device at91sam9261_twi_device = { |
320 | .id = -1, | 320 | .id = 0, |
321 | .resource = twi_resources, | 321 | .resource = twi_resources, |
322 | .num_resources = ARRAY_SIZE(twi_resources), | 322 | .num_resources = ARRAY_SIZE(twi_resources), |
323 | }; | 323 | }; |