Commit 25da383d authored by David Brownell's avatar David Brownell Committed by Jean Delvare

i2c/isp1301_omap: Build fixes, whitespace

Build fixes for isp1301_omap driver.  I think an earlier version
of this must have gotten lost somewhere, or maybe it only went
into the Linux-OMAP tree.

Also, some whitespace fixes to bring this more into sync with the
version of this found in the Linux-OMAP tree.  (That version has
updates for the OTG controller on the OMAP 1710 which break that
functionality on OMAP 161x boards like the H2, so merging all of
it is not currently an option.)
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 322454a6
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#undef DEBUG
#undef VERBOSE
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -44,7 +42,7 @@ ...@@ -44,7 +42,7 @@
#define DRIVER_VERSION "24 August 2004" #define DRIVER_VERSION "24 August 2004"
#define DRIVER_NAME (isp1301_driver.name) #define DRIVER_NAME (isp1301_driver.driver.name)
MODULE_DESCRIPTION("ISP1301 USB OTG Transceiver Driver"); MODULE_DESCRIPTION("ISP1301 USB OTG Transceiver Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -55,6 +53,7 @@ struct isp1301 { ...@@ -55,6 +53,7 @@ struct isp1301 {
void (*i2c_release)(struct device *dev); void (*i2c_release)(struct device *dev);
int irq; int irq;
int irq_type;
u32 last_otg_ctrl; u32 last_otg_ctrl;
unsigned working:1; unsigned working:1;
...@@ -94,7 +93,7 @@ struct isp1301 { ...@@ -94,7 +93,7 @@ struct isp1301 {
/* board-specific PM hooks */ /* board-specific PM hooks */
#include <asm/arch/gpio.h> #include <asm/gpio.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -1100,9 +1099,9 @@ static u8 isp1301_clear_latch(struct isp1301 *isp) ...@@ -1100,9 +1099,9 @@ static u8 isp1301_clear_latch(struct isp1301 *isp)
} }
static void static void
isp1301_work(void *data) isp1301_work(struct work_struct *work)
{ {
struct isp1301 *isp = data; struct isp1301 *isp = container_of(work, struct isp1301, work);
int stop; int stop;
/* implicit lock: we're the only task using this device */ /* implicit lock: we're the only task using this device */
...@@ -1494,7 +1493,7 @@ static int isp1301_probe(struct i2c_adapter *bus, int address, int kind) ...@@ -1494,7 +1493,7 @@ static int isp1301_probe(struct i2c_adapter *bus, int address, int kind)
if (!isp) if (!isp)
return 0; return 0;
INIT_WORK(&isp->work, isp1301_work, isp); INIT_WORK(&isp->work, isp1301_work);
init_timer(&isp->timer); init_timer(&isp->timer);
isp->timer.function = isp1301_timer; isp->timer.function = isp1301_timer;
isp->timer.data = (unsigned long) isp; isp->timer.data = (unsigned long) isp;
...@@ -1572,13 +1571,14 @@ fail1: ...@@ -1572,13 +1571,14 @@ fail1:
/* IRQ wired at M14 */ /* IRQ wired at M14 */
omap_cfg_reg(M14_1510_GPIO2); omap_cfg_reg(M14_1510_GPIO2);
isp->irq = OMAP_GPIO_IRQ(2); isp->irq = OMAP_GPIO_IRQ(2);
omap_request_gpio(2); if (gpio_request(2, "isp1301") == 0)
omap_set_gpio_direction(2, 1); gpio_direction_input(2);
omap_set_gpio_edge_ctrl(2, OMAP_GPIO_FALLING_EDGE); isp->irq_type = IRQF_TRIGGER_FALLING;
} }
isp->irq_type |= IRQF_SAMPLE_RANDOM;
status = request_irq(isp->irq, isp1301_irq, status = request_irq(isp->irq, isp1301_irq,
IRQF_SAMPLE_RANDOM, DRIVER_NAME, isp); isp->irq_type, DRIVER_NAME, isp);
if (status < 0) { if (status < 0) {
dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n", dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n",
isp->irq, status); isp->irq, status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment