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: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
@@ -109,7 +109,8 @@ static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c)
|
||||
* 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)
|
||||
return (struct s3c2410_platform_i2c *)dev->platform_data;
|
||||
@@ -143,7 +144,6 @@ static inline void s3c24xx_i2c_disable_ack(struct s3c24xx_i2c *i2c)
|
||||
|
||||
tmp = readl(i2c->regs + S3C2410_IICCON);
|
||||
writel(tmp & ~S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON);
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
writel(tmp | S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON);
|
||||
|
||||
}
|
||||
|
||||
/* irq enable/disable functions */
|
||||
@@ -198,7 +197,7 @@ static void s3c24xx_i2c_message_start(struct s3c24xx_i2c *i2c,
|
||||
if (msg->flags & I2C_M_REV_DIR_ADDR)
|
||||
addr ^= 1;
|
||||
|
||||
// todo - check for wether ack wanted or not
|
||||
/* todo - check for wether ack wanted or not */
|
||||
s3c24xx_i2c_enable_ack(i2c);
|
||||
|
||||
iiccon = readl(i2c->regs + S3C2410_IICCON);
|
||||
@@ -374,7 +373,6 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
|
||||
|
||||
goto retry_write;
|
||||
} else {
|
||||
|
||||
/* send the new start */
|
||||
s3c24xx_i2c_message_start(i2c, i2c->msg);
|
||||
i2c->state = STATE_START;
|
||||
@@ -449,7 +447,7 @@ static irqreturn_t s3c24xx_i2c_irq(int irqno, void *dev_id)
|
||||
status = readl(i2c->regs + S3C2410_IICSTAT);
|
||||
|
||||
if (status & S3C2410_IICSTAT_ARBITR) {
|
||||
// deal with arbitration loss
|
||||
/* deal with arbitration loss */
|
||||
dev_err(i2c->dev, "deal with arbitration loss\n");
|
||||
}
|
||||
|
||||
@@ -502,7 +500,8 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
|
||||
* 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;
|
||||
int ret;
|
||||
@@ -642,7 +641,7 @@ static inline int freq_acceptable(unsigned int freq, unsigned int wanted)
|
||||
{
|
||||
int diff = freq - wanted;
|
||||
|
||||
return (diff >= -2 && diff <= 2);
|
||||
return diff >= -2 && diff <= 2;
|
||||
}
|
||||
|
||||
/* s3c24xx_i2c_clockrate
|
||||
@@ -877,7 +876,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
|
||||
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 */
|
||||
|
||||
|
Reference in New Issue
Block a user