Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104613
b: refs/heads/master
c: 64b3d6d
h: refs/heads/master
i:
  104611: 8d38b2e
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 6539aa1 commit cdb81c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71be4f81e97fe1f42c48a6dfc411dc6d3c18687f
refs/heads/master: 64b3d6d11948cc71ff12124dcb693392a32f1bf4
26 changes: 12 additions & 14 deletions trunk/drivers/usb/host/ohci-pnx4008.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ static struct clk *usb_clk;

static int isp1301_probe(struct i2c_adapter *adap);
static int isp1301_detach(struct i2c_client *client);
static int isp1301_command(struct i2c_client *client, unsigned int cmd,
void *arg);

static const unsigned short normal_i2c[] =
{ ISP1301_I2C_ADDR, ISP1301_I2C_ADDR + 1, I2C_CLIENT_END };
Expand All @@ -123,30 +121,37 @@ static struct i2c_client_address_data addr_data = {
};

struct i2c_driver isp1301_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "isp1301_pnx",
},
.attach_adapter = isp1301_probe,
.detach_client = isp1301_detach,
.command = isp1301_command
};

static int isp1301_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct i2c_client *c;
int err;

c = kzalloc(sizeof(*c), GFP_KERNEL);

if (!c)
return -ENOMEM;

strcpy(c->name, "isp1301");
strlcpy(c->name, "isp1301_pnx", I2C_NAME_SIZE);
c->flags = 0;
c->addr = addr;
c->adapter = adap;
c->driver = &isp1301_driver;

err = i2c_attach_client(c);
if (err) {
kfree(c);
return err;
}

isp1301_i2c_client = c;

return i2c_attach_client(c);
return 0;
}

static int isp1301_probe(struct i2c_adapter *adap)
Expand All @@ -161,13 +166,6 @@ static int isp1301_detach(struct i2c_client *client)
return 0;
}

/* No commands defined */
static int isp1301_command(struct i2c_client *client, unsigned int cmd,
void *arg)
{
return 0;
}

static void i2c_write(u8 buf, u8 subaddr)
{
char tmpbuf[2];
Expand Down

0 comments on commit cdb81c5

Please sign in to comment.