Skip to content

Commit

Permalink
sh: i2c compile fix for kfr2r09
Browse files Browse the repository at this point in the history
Fix the kfr2r09 board code so it compiles if CONFIG_I2C=n.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Aug 20, 2009
1 parent e89561c commit 045a4b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/sh/boards/mach-kfr2r09/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ static struct platform_device *kfr2r09_devices[] __initdata = {
#define BSC_CS4WCR 0xfec10030
#define PORT_MSELCRB 0xa4050182

#ifdef CONFIG_I2C
static int kfr2r09_usb0_gadget_i2c_setup(void)
{
struct i2c_adapter *a;
Expand Down Expand Up @@ -261,6 +262,12 @@ static int kfr2r09_usb0_gadget_i2c_setup(void)

return 0;
}
#else
static int kfr2r09_usb0_gadget_i2c_setup(void)
{
return -ENODEV;
}
#endif

static int kfr2r09_usb0_gadget_setup(void)
{
Expand Down

0 comments on commit 045a4b7

Please sign in to comment.