Re: [PATCH v5] misc: adds support the FSA9480 USB Switch

From: Andrew Morton
Date: Wed Jun 29 2011 - 15:55:54 EST


On Wed, 29 Jun 2011 19:14:23 +0900
Donggeun Kim <dg77.kim@xxxxxxxxxxx> wrote:

> The FSA9480 is a USB port accessory detector and switch.
> This patch adds support the FSA9480 USB Switch.
>
> ...
>
> +static struct fsa9480_usbsw *chip;

So there can only ever be one device per system. Is this a good
assumption?


Does this fix look OK?

--- a/drivers/misc/fsa9480.c~drivers-misc-add-support-the-fsa9480-usb-switch-fix
+++ a/drivers/misc/fsa9480.c
@@ -145,7 +145,7 @@ static int fsa9480_read_irq(struct i2c_c
return ret;
}

-void fsa9480_set_switch(const char *buf)
+static void fsa9480_set_switch(const char *buf)
{
struct fsa9480_usbsw *usbsw = chip;
struct i2c_client *client = usbsw->client;
@@ -179,7 +179,7 @@ void fsa9480_set_switch(const char *buf)
fsa9480_write_reg(client, FSA9480_REG_CTRL, value);
}

-ssize_t fsa9480_get_switch(char *buf)
+static ssize_t fsa9480_get_switch(char *buf)
{
struct fsa9480_usbsw *usbsw = chip;
struct i2c_client *client = usbsw->client;
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/