提交 3d0911bf 编写于 作者: B Ben Dooks

i2c-s3c2410: Fixup style problems from checkpatch.pl

Fixup the 36 warnings and errors generated from running
checkpatch.pl on the driver. The warnings are too numerous
to be listed here.
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
上级 1bda7128
...@@ -109,7 +109,8 @@ static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c) ...@@ -109,7 +109,8 @@ static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c)
* the default if there is none * the default if there is none
*/ */
static inline struct s3c2410_platform_i2c *s3c24xx_i2c_get_platformdata(struct device *dev) static inline struct s3c2410_platform_i2c *
s3c24xx_i2c_get_platformdata(struct device *dev)
{ {
if (dev->platform_data != NULL) if (dev->platform_data != NULL)
return (struct s3c2410_platform_i2c *)dev->platform_data; return (struct s3c2410_platform_i2c *)dev->platform_data;
...@@ -129,7 +130,7 @@ static inline void s3c24xx_i2c_master_complete(struct s3c24xx_i2c *i2c, int ret) ...@@ -129,7 +130,7 @@ static inline void s3c24xx_i2c_master_complete(struct s3c24xx_i2c *i2c, int ret)
i2c->msg_ptr = 0; i2c->msg_ptr = 0;
i2c->msg = NULL; i2c->msg = NULL;
i2c->msg_idx ++; i2c->msg_idx++;
i2c->msg_num = 0; i2c->msg_num = 0;
if (ret) if (ret)
i2c->msg_idx = ret; i2c->msg_idx = ret;
...@@ -143,7 +144,6 @@ static inline void s3c24xx_i2c_disable_ack(struct s3c24xx_i2c *i2c) ...@@ -143,7 +144,6 @@ static inline void s3c24xx_i2c_disable_ack(struct s3c24xx_i2c *i2c)
tmp = readl(i2c->regs + S3C2410_IICCON); tmp = readl(i2c->regs + S3C2410_IICCON);
writel(tmp & ~S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON); writel(tmp & ~S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON);
} }
static inline void s3c24xx_i2c_enable_ack(struct s3c24xx_i2c *i2c) static inline void s3c24xx_i2c_enable_ack(struct s3c24xx_i2c *i2c)
...@@ -152,7 +152,6 @@ static inline void s3c24xx_i2c_enable_ack(struct s3c24xx_i2c *i2c) ...@@ -152,7 +152,6 @@ static inline void s3c24xx_i2c_enable_ack(struct s3c24xx_i2c *i2c)
tmp = readl(i2c->regs + S3C2410_IICCON); tmp = readl(i2c->regs + S3C2410_IICCON);
writel(tmp | S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON); writel(tmp | S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON);
} }
/* irq enable/disable functions */ /* irq enable/disable functions */
...@@ -198,7 +197,7 @@ static void s3c24xx_i2c_message_start(struct s3c24xx_i2c *i2c, ...@@ -198,7 +197,7 @@ static void s3c24xx_i2c_message_start(struct s3c24xx_i2c *i2c,
if (msg->flags & I2C_M_REV_DIR_ADDR) if (msg->flags & I2C_M_REV_DIR_ADDR)
addr ^= 1; addr ^= 1;
// todo - check for wether ack wanted or not /* todo - check for wether ack wanted or not */
s3c24xx_i2c_enable_ack(i2c); s3c24xx_i2c_enable_ack(i2c);
iiccon = readl(i2c->regs + S3C2410_IICCON); iiccon = readl(i2c->regs + S3C2410_IICCON);
...@@ -226,7 +225,7 @@ static inline void s3c24xx_i2c_stop(struct s3c24xx_i2c *i2c, int ret) ...@@ -226,7 +225,7 @@ static inline void s3c24xx_i2c_stop(struct s3c24xx_i2c *i2c, int ret)
dev_dbg(i2c->dev, "STOP\n"); dev_dbg(i2c->dev, "STOP\n");
/* stop the transfer */ /* stop the transfer */
iicstat &= ~ S3C2410_IICSTAT_START; iicstat &= ~S3C2410_IICSTAT_START;
writel(iicstat, i2c->regs + S3C2410_IICSTAT); writel(iicstat, i2c->regs + S3C2410_IICSTAT);
i2c->state = STATE_STOP; i2c->state = STATE_STOP;
...@@ -358,7 +357,7 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat) ...@@ -358,7 +357,7 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
dev_dbg(i2c->dev, "WRITE: Next Message\n"); dev_dbg(i2c->dev, "WRITE: Next Message\n");
i2c->msg_ptr = 0; i2c->msg_ptr = 0;
i2c->msg_idx ++; i2c->msg_idx++;
i2c->msg++; i2c->msg++;
/* check to see if we need to do another message */ /* check to see if we need to do another message */
...@@ -374,7 +373,6 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat) ...@@ -374,7 +373,6 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
goto retry_write; goto retry_write;
} else { } else {
/* send the new start */ /* send the new start */
s3c24xx_i2c_message_start(i2c, i2c->msg); s3c24xx_i2c_message_start(i2c, i2c->msg);
i2c->state = STATE_START; i2c->state = STATE_START;
...@@ -449,7 +447,7 @@ static irqreturn_t s3c24xx_i2c_irq(int irqno, void *dev_id) ...@@ -449,7 +447,7 @@ static irqreturn_t s3c24xx_i2c_irq(int irqno, void *dev_id)
status = readl(i2c->regs + S3C2410_IICSTAT); status = readl(i2c->regs + S3C2410_IICSTAT);
if (status & S3C2410_IICSTAT_ARBITR) { if (status & S3C2410_IICSTAT_ARBITR) {
// deal with arbitration loss /* deal with arbitration loss */
dev_err(i2c->dev, "deal with arbitration loss\n"); dev_err(i2c->dev, "deal with arbitration loss\n");
} }
...@@ -502,7 +500,8 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c) ...@@ -502,7 +500,8 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
* this starts an i2c transfer * this starts an i2c transfer
*/ */
static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int num) static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
struct i2c_msg *msgs, int num)
{ {
unsigned long timeout; unsigned long timeout;
int ret; int ret;
...@@ -642,7 +641,7 @@ static inline int freq_acceptable(unsigned int freq, unsigned int wanted) ...@@ -642,7 +641,7 @@ static inline int freq_acceptable(unsigned int freq, unsigned int wanted)
{ {
int diff = freq - wanted; int diff = freq - wanted;
return (diff >= -2 && diff <= 2); return diff >= -2 && diff <= 2;
} }
/* s3c24xx_i2c_clockrate /* s3c24xx_i2c_clockrate
...@@ -877,7 +876,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ...@@ -877,7 +876,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
goto err_ioarea; goto err_ioarea;
} }
dev_dbg(&pdev->dev, "registers %p (%p, %p)\n", i2c->regs, i2c->ioarea, res); dev_dbg(&pdev->dev, "registers %p (%p, %p)\n",
i2c->regs, i2c->ioarea, res);
/* setup info block for the i2c core */ /* setup info block for the i2c core */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册