Skip to content

Commit

Permalink
ARM: N30: Use s3c_i2c0_set_platdata() to set I2C platform data
Browse files Browse the repository at this point in the history
Fix mach-n30.c to use the s3c_i2c0_set_platdata() call to register the
platform data with the system to get rid of any reliance on having a real
device structure available in memory.

Since s3c_i2c0_set_platdata() copies the data, mark the original as
__initdata so it is thrown away.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Ben Dooks committed Dec 1, 2009
1 parent 372359e commit 7bcb7ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c2410/mach-n30.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static struct platform_device *n35_devices[] __initdata = {
&n35_button_device,
};

static struct s3c2410_platform_i2c n30_i2ccfg = {
static struct s3c2410_platform_i2c __initdata n30_i2ccfg = {
.flags = 0,
.slave_addr = 0x10,
.frequency = 10*1000,
Expand Down Expand Up @@ -500,8 +500,8 @@ static void __init n30_init_irq(void)
static void __init n30_init(void)
{
s3c24xx_fb_set_platdata(&n30_fb_info);
s3c_device_i2c0.dev.platform_data = &n30_i2ccfg;
s3c24xx_udc_set_platdata(&n30_udc_cfg);
s3c_i2c0_set_platdata(&n30_i2ccfg);

/* Turn off suspend on both USB ports, and switch the
* selectable USB port to USB device mode. */
Expand Down

0 comments on commit 7bcb7ed

Please sign in to comment.