lkml.org 
[lkml]   [2011]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v5] misc: adds support the FSA9480 USB Switch
On Wed, 29 Jun 2011 19:14:23 +0900
Donggeun Kim <dg77.kim@samsung.com> 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;
_


\
 
 \ /
  Last update: 2011-06-29 21:57    [W:4.139 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site