X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fohci-pnx4008.c;h=6ad8f2fc57b92b819e873292c3c0bfe08141995b;hp=28b458f20cc3013749503821119e5e741e58a85f;hb=1481b9109fe771ec8b035d7760f42e36d2bed5d4;hpb=6c118e43dc513a7118b49b9ff953fe61e14515dc diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c index 28b458f20cc3..6ad8f2fc57b9 100644 --- a/drivers/usb/host/ohci-pnx4008.c +++ b/drivers/usb/host/ohci-pnx4008.c @@ -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 }; @@ -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) @@ -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]; @@ -389,7 +387,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) while ((__raw_readl(USB_OTG_CLK_STAT) & USB_CLOCK_MASK) != USB_CLOCK_MASK) ; - hcd = usb_create_hcd (driver, &pdev->dev, pdev->dev.bus_id); + hcd = usb_create_hcd (driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) { err("Failed to allocate HC buffer"); ret = -ENOMEM;