git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
i2c
/
chips
/
isp1301_omap.c
diff --git
a/drivers/i2c/chips/isp1301_omap.c
b/drivers/i2c/chips/isp1301_omap.c
index
d7fec78
..
ccdf3e9
100644
(file)
--- a/
drivers/i2c/chips/isp1301_omap.c
+++ b/
drivers/i2c/chips/isp1301_omap.c
@@
-21,17
+21,16
@@
#undef DEBUG
#undef VERBOSE
#undef DEBUG
#undef VERBOSE
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include <linux/device.h>
+#include <linux/
platform_
device.h>
#include <linux/usb_ch9.h>
#include <linux/usb_gadget.h>
#include <linux/usb.h>
#include <linux/usb_ch9.h>
#include <linux/usb_gadget.h>
#include <linux/usb.h>
-#include <linux/usb
_
otg.h>
+#include <linux/usb
/
otg.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
@@
-145,7
+144,6
@@
static inline void notresponding(struct isp1301 *isp)
static unsigned short normal_i2c[] = {
ISP_BASE, ISP_BASE + 1,
I2C_CLIENT_END };
static unsigned short normal_i2c[] = {
ISP_BASE, ISP_BASE + 1,
I2C_CLIENT_END };
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
I2C_CLIENT_INSMOD;
@@
-671,7
+669,7
@@
pulldown:
dump_regs(isp, "otg->isp1301");
}
dump_regs(isp, "otg->isp1301");
}
-static irqreturn_t omap_otg_irq(int irq, void *_isp
, struct pt_regs *regs
)
+static irqreturn_t omap_otg_irq(int irq, void *_isp)
{
u16 otg_irq = OTG_IRQ_SRC_REG;
u32 otg_ctrl;
{
u16 otg_irq = OTG_IRQ_SRC_REG;
u32 otg_ctrl;
@@
-874,25
+872,27
@@
static int otg_init(struct isp1301 *isp)
return 0;
}
return 0;
}
-static int otg_probe(struct device *dev)
+static int otg_probe(struct
platform_
device *dev)
{
// struct omap_usb_config *config = dev->platform_data;
{
// struct omap_usb_config *config = dev->platform_data;
- otg_dev =
to_platform_device(dev)
;
+ otg_dev =
dev
;
return 0;
}
return 0;
}
-static int otg_remove(struct device *dev)
+static int otg_remove(struct
platform_
device *dev)
{
otg_dev = 0;
return 0;
}
{
otg_dev = 0;
return 0;
}
-struct device_driver omap_otg_driver = {
- .name = "omap_otg",
- .bus = &platform_bus_type,
+struct platform_driver omap_otg_driver = {
.probe = otg_probe,
.probe = otg_probe,
- .remove = otg_remove,
+ .remove = otg_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "omap_otg",
+ },
};
static int otg_bind(struct isp1301 *isp)
};
static int otg_bind(struct isp1301 *isp)
@@
-902,18
+902,18
@@
static int otg_bind(struct isp1301 *isp)
if (otg_dev)
return -EBUSY;
if (otg_dev)
return -EBUSY;
- status = driver_register(&omap_otg_driver);
+ status =
platform_
driver_register(&omap_otg_driver);
if (status < 0)
return status;
if (otg_dev)
status = request_irq(otg_dev->resource[1].start, omap_otg_irq,
if (status < 0)
return status;
if (otg_dev)
status = request_irq(otg_dev->resource[1].start, omap_otg_irq,
-
SA_INTERRUPT
, DRIVER_NAME, isp);
+
IRQF_DISABLED
, DRIVER_NAME, isp);
else
status = -ENODEV;
if (status < 0)
else
status = -ENODEV;
if (status < 0)
- driver_unregister(&omap_otg_driver);
+
platform_
driver_unregister(&omap_otg_driver);
return status;
}
return status;
}
@@
-1181,7
+1181,7
@@
isp1301_work(void *data)
isp->working = 0;
}
isp->working = 0;
}
-static irqreturn_t isp1301_irq(int irq, void *isp
, struct pt_regs *regs
)
+static irqreturn_t isp1301_irq(int irq, void *isp)
{
isp1301_defer_work(isp, WORK_UPDATE_OTG);
return IRQ_HANDLED;
{
isp1301_defer_work(isp, WORK_UPDATE_OTG);
return IRQ_HANDLED;
@@
-1490,7
+1490,7
@@
static int isp1301_probe(struct i2c_adapter *bus, int address, int kind)
if (the_transceiver)
return 0;
if (the_transceiver)
return 0;
- isp = k
calloc(1,
sizeof *isp, GFP_KERNEL);
+ isp = k
zalloc(
sizeof *isp, GFP_KERNEL);
if (!isp)
return 0;
if (!isp)
return 0;
@@
-1503,7
+1503,6
@@
static int isp1301_probe(struct i2c_adapter *bus, int address, int kind)
isp->client.addr = address;
i2c_set_clientdata(&isp->client, isp);
isp->client.adapter = bus;
isp->client.addr = address;
i2c_set_clientdata(&isp->client, isp);
isp->client.adapter = bus;
- isp->client.id = 1301;
isp->client.driver = &isp1301_driver;
strlcpy(isp->client.name, DRIVER_NAME, I2C_NAME_SIZE);
i2c = &isp->client;
isp->client.driver = &isp1301_driver;
strlcpy(isp->client.name, DRIVER_NAME, I2C_NAME_SIZE);
i2c = &isp->client;
@@
-1579,7
+1578,7
@@
fail1:
}
status = request_irq(isp->irq, isp1301_irq,
}
status = request_irq(isp->irq, isp1301_irq,
-
SA
_SAMPLE_RANDOM, DRIVER_NAME, isp);
+
IRQF
_SAMPLE_RANDOM, DRIVER_NAME, isp);
if (status < 0) {
dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n",
isp->irq, status);
if (status < 0) {
dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n",
isp->irq, status);
@@
-1632,11
+1631,9
@@
static int isp1301_scan_bus(struct i2c_adapter *bus)
}
static struct i2c_driver isp1301_driver = {
}
static struct i2c_driver isp1301_driver = {
- .owner = THIS_MODULE,
- .name = "isp1301_omap",
- .id = 1301, /* FIXME "official", i2c-ids.h */
- .class = I2C_CLASS_HWMON,
- .flags = I2C_DF_NOTIFY,
+ .driver = {
+ .name = "isp1301_omap",
+ },
.attach_adapter = isp1301_scan_bus,
.detach_client = isp1301_detach_client,
};
.attach_adapter = isp1301_scan_bus,
.detach_client = isp1301_detach_client,
};