diff options
Diffstat (limited to 'arch/ppc/platforms/mpc885ads_setup.c')
-rw-r--r-- | arch/ppc/platforms/mpc885ads_setup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c index 02293141efb5..f8161f3557f5 100644 --- a/arch/ppc/platforms/mpc885ads_setup.c +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -263,7 +263,7 @@ static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | |||
263 | char *e; | 263 | char *e; |
264 | int i; | 264 | int i; |
265 | 265 | ||
266 | if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) { | 266 | if(fs_no >= ARRAY_SIZE(mpc8xx_enet_pdata)) { |
267 | printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); | 267 | printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); |
268 | return; | 268 | return; |
269 | } | 269 | } |
@@ -371,7 +371,7 @@ static void __init mpc885ads_fixup_uart_pdata(struct platform_device *pdev, | |||
371 | int id = fs_uart_id_smc2fsid(idx); | 371 | int id = fs_uart_id_smc2fsid(idx); |
372 | 372 | ||
373 | /* no need to alter anything if console */ | 373 | /* no need to alter anything if console */ |
374 | if ((id <= num) && (!pdev->dev.platform_data)) { | 374 | if ((id < num) && (!pdev->dev.platform_data)) { |
375 | pinfo = &mpc885_uart_pdata[id]; | 375 | pinfo = &mpc885_uart_pdata[id]; |
376 | pinfo->uart_clk = bd->bi_intfreq; | 376 | pinfo->uart_clk = bd->bi_intfreq; |
377 | pdev->dev.platform_data = pinfo; | 377 | pdev->dev.platform_data = pinfo; |