Skip to content

Commit

Permalink
sh: sh7750: Fix incompatible pointer type
Browse files Browse the repository at this point in the history
It is necessary to set array of struct platform_device in
early_platform_add_devices().

arch/sh/kernel/cpu/sh4/setup-sh7750.c: In function ‘plat_early_device_setup’:
arch/sh/kernel/cpu/sh4/setup-sh7750.c:260: warning: passing argument 1 of ‘early_platform_add_devices’ from incompatible pointer type
include/linux/platform_device.h:159: note: expected ‘struct platform_device **’ but argument is of type ‘struct platform_device *’
arch/sh/kernel/cpu/sh4/setup-sh7750.c:262: warning: passing argument 1 of ‘early_platform_add_devices’ from incompatible pointer type
include/linux/platform_device.h:159: note: expected ‘struct platform_device **’ but argument is of type ‘struct platform_device *’
arch/sh/kernel/cpu/sh4/setup-sh7750.c:263: warning: passing argument 1 of ‘early_platform_add_devices’ from incompatible pointer type
include/linux/platform_device.h:159: note: expected ‘struct platform_device **’ but argument is of type ‘struct platform_device *’

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Nobuhiro Iwamatsu authored and Paul Mundt committed Feb 1, 2011
1 parent 5939d25 commit 0ce0887
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions arch/sh/kernel/cpu/sh4/setup-sh7750.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,17 @@ static struct platform_device *sh7750_early_devices[] __initdata = {

void __init plat_early_device_setup(void)
{
struct platform_device *dev[1];

if (mach_is_rts7751r2d()) {
scif_platform_data.scscr |= SCSCR_CKE1;
early_platform_add_devices(&scif_device, 1);
dev[0] = &scif_device;
early_platform_add_devices(dev, 1);
} else {
early_platform_add_devices(&sci_device, 1);
early_platform_add_devices(&scif_device, 1);
dev[0] = &sci_device;
early_platform_add_devices(dev, 1);
dev[0] = &scif_device;
early_platform_add_devices(dev, 1);
}

early_platform_add_devices(sh7750_early_devices,
Expand Down

0 comments on commit 0ce0887

Please sign in to comment.