Commit 71e9e6a5 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-torvalds' of...

Merge branch 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson

* 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  rtc: fix coh901331 startup crash
  mach-ux500: fix i2c0 device setup regression
parents 9ade0cf4 9cf3b5fa
...@@ -178,16 +178,15 @@ static struct i2c_board_info __initdata mop500_i2c0_devices[] = { ...@@ -178,16 +178,15 @@ static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
.irq = NOMADIK_GPIO_TO_IRQ(217), .irq = NOMADIK_GPIO_TO_IRQ(217),
.platform_data = &mop500_tc35892_data, .platform_data = &mop500_tc35892_data,
}, },
}; /* I2C0 devices only available prior to HREFv60 */
/* I2C0 devices only available prior to HREFv60 */
static struct i2c_board_info __initdata mop500_i2c0_old_devices[] = {
{ {
I2C_BOARD_INFO("tps61052", 0x33), I2C_BOARD_INFO("tps61052", 0x33),
.platform_data = &mop500_tps61052_data, .platform_data = &mop500_tps61052_data,
}, },
}; };
#define NUM_PRE_V60_I2C0_DEVICES 1
static struct i2c_board_info __initdata mop500_i2c2_devices[] = { static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
{ {
/* lp5521 LED driver, 1st device */ /* lp5521 LED driver, 1st device */
...@@ -425,6 +424,8 @@ static void __init mop500_uart_init(void) ...@@ -425,6 +424,8 @@ static void __init mop500_uart_init(void)
static void __init mop500_init_machine(void) static void __init mop500_init_machine(void)
{ {
int i2c0_devs;
/* /*
* The HREFv60 board removed a GPIO expander and routed * The HREFv60 board removed a GPIO expander and routed
* all these GPIO pins to the internal GPIO controller * all these GPIO pins to the internal GPIO controller
...@@ -448,11 +449,11 @@ static void __init mop500_init_machine(void) ...@@ -448,11 +449,11 @@ static void __init mop500_init_machine(void)
platform_device_register(&ab8500_device); platform_device_register(&ab8500_device);
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
ARRAY_SIZE(mop500_i2c0_devices)); if (machine_is_hrefv60())
if (!machine_is_hrefv60()) i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
i2c_register_board_info(0, mop500_i2c0_old_devices,
ARRAY_SIZE(mop500_i2c0_old_devices)); i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
i2c_register_board_info(2, mop500_i2c2_devices, i2c_register_board_info(2, mop500_i2c2_devices,
ARRAY_SIZE(mop500_i2c2_devices)); ARRAY_SIZE(mop500_i2c2_devices));
} }
......
...@@ -220,6 +220,7 @@ static int __init coh901331_probe(struct platform_device *pdev) ...@@ -220,6 +220,7 @@ static int __init coh901331_probe(struct platform_device *pdev)
} }
clk_disable(rtap->clk); clk_disable(rtap->clk);
platform_set_drvdata(pdev, rtap);
rtap->rtc = rtc_device_register("coh901331", &pdev->dev, &coh901331_ops, rtap->rtc = rtc_device_register("coh901331", &pdev->dev, &coh901331_ops,
THIS_MODULE); THIS_MODULE);
if (IS_ERR(rtap->rtc)) { if (IS_ERR(rtap->rtc)) {
...@@ -227,11 +228,10 @@ static int __init coh901331_probe(struct platform_device *pdev) ...@@ -227,11 +228,10 @@ static int __init coh901331_probe(struct platform_device *pdev)
goto out_no_rtc; goto out_no_rtc;
} }
platform_set_drvdata(pdev, rtap);
return 0; return 0;
out_no_rtc: out_no_rtc:
platform_set_drvdata(pdev, NULL);
out_no_clk_enable: out_no_clk_enable:
clk_put(rtap->clk); clk_put(rtap->clk);
out_no_clk: out_no_clk:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment