Skip to content

Commit 2e57848

Browse files
author
Lee Jones
committed
mfd: 88pm860x-core: Repair formatting issues
Fixes the following checkpatch warnings: WARNING: please, no space before tabs #5: FILE: drivers/mfd/88pm860x-core.c:5: + * ^IHaojian Zhuang <[email protected]>$ WARNING: line over 80 characters #143: FILE: drivers/mfd/88pm860x-core.c:143: + {PM8607_IRQ_AUDIO_SHORT, PM8607_IRQ_AUDIO_SHORT, "audio-short", IORESOURCE_IRQ,}, WARNING: line over 80 characters #153: FILE: drivers/mfd/88pm860x-core.c:153: + {PM8607_IRQ_CHG_DONE, PM8607_IRQ_CHG_DONE, "charging done", IORESOURCE_IRQ,}, WARNING: line over 80 characters #154: FILE: drivers/mfd/88pm860x-core.c:154: + {PM8607_IRQ_CHG_FAIL, PM8607_IRQ_CHG_FAIL, "charging timeout", IORESOURCE_IRQ,}, WARNING: line over 80 characters #155: FILE: drivers/mfd/88pm860x-core.c:155: + {PM8607_IRQ_CHG_FAULT, PM8607_IRQ_CHG_FAULT, "charging fault", IORESOURCE_IRQ,}, WARNING: line over 80 characters #156: FILE: drivers/mfd/88pm860x-core.c:156: + {PM8607_IRQ_GPADC1, PM8607_IRQ_GPADC1, "battery temperature", IORESOURCE_IRQ,}, WARNING: Avoid unnecessary line continuations #571: FILE: drivers/mfd/88pm860x-core.c:571: + struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \ WARNING: line over 80 characters #634: FILE: drivers/mfd/88pm860x-core.c:634: + ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq, flags | IRQF_ONESHOT, WARNING: Unnecessary parentheses - maybe == should be = ? #874: FILE: drivers/mfd/88pm860x-core.c:874: + if ((pdata == NULL)) WARNING: quoted string split across lines #1001: FILE: drivers/mfd/88pm860x-core.c:1001: + dev_err(chip->dev, "Failed to detect Marvell 88PM8607. " + "Chip ID: %02x\n", ret); WARNING: quoted string split across lines #1124: FILE: drivers/mfd/88pm860x-core.c:1124: + dev_err(dev, "Not found \"marvell,88pm860x-slave-addr\" " + "property\n"); total: 0 errors, 11 warnings, 1281 lines checked Signed-off-by: Lee Jones <[email protected]>
1 parent dc54392 commit 2e57848

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

drivers/mfd/88pm860x-core.c

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Base driver for Marvell 88PM8607
33
*
44
* Copyright (C) 2009 Marvell International Ltd.
5-
* Haojian Zhuang <[email protected]>
5+
*
6+
* Author: Haojian Zhuang <[email protected]>
67
*
78
* This program is free software; you can redistribute it and/or modify
89
* it under the terms of the GNU General Public License version 2 as
@@ -140,7 +141,8 @@ static struct resource codec_resources[] = {
140141
/* Headset insertion or removal */
141142
{PM8607_IRQ_HEADSET, PM8607_IRQ_HEADSET, "headset", IORESOURCE_IRQ,},
142143
/* Audio short */
143-
{PM8607_IRQ_AUDIO_SHORT, PM8607_IRQ_AUDIO_SHORT, "audio-short", IORESOURCE_IRQ,},
144+
{PM8607_IRQ_AUDIO_SHORT, PM8607_IRQ_AUDIO_SHORT, "audio-short",
145+
IORESOURCE_IRQ,},
144146
};
145147

146148
static struct resource battery_resources[] = {
@@ -150,10 +152,14 @@ static struct resource battery_resources[] = {
150152

151153
static struct resource charger_resources[] = {
152154
{PM8607_IRQ_CHG, PM8607_IRQ_CHG, "charger detect", IORESOURCE_IRQ,},
153-
{PM8607_IRQ_CHG_DONE, PM8607_IRQ_CHG_DONE, "charging done", IORESOURCE_IRQ,},
154-
{PM8607_IRQ_CHG_FAIL, PM8607_IRQ_CHG_FAIL, "charging timeout", IORESOURCE_IRQ,},
155-
{PM8607_IRQ_CHG_FAULT, PM8607_IRQ_CHG_FAULT, "charging fault", IORESOURCE_IRQ,},
156-
{PM8607_IRQ_GPADC1, PM8607_IRQ_GPADC1, "battery temperature", IORESOURCE_IRQ,},
155+
{PM8607_IRQ_CHG_DONE, PM8607_IRQ_CHG_DONE, "charging done",
156+
IORESOURCE_IRQ,},
157+
{PM8607_IRQ_CHG_FAIL, PM8607_IRQ_CHG_FAIL, "charging timeout",
158+
IORESOURCE_IRQ,},
159+
{PM8607_IRQ_CHG_FAULT, PM8607_IRQ_CHG_FAULT, "charging fault",
160+
IORESOURCE_IRQ,},
161+
{PM8607_IRQ_GPADC1, PM8607_IRQ_GPADC1, "battery temperature",
162+
IORESOURCE_IRQ,},
157163
{PM8607_IRQ_VBAT, PM8607_IRQ_VBAT, "battery voltage", IORESOURCE_IRQ,},
158164
{PM8607_IRQ_VCHG, PM8607_IRQ_VCHG, "vchg voltage", IORESOURCE_IRQ,},
159165
};
@@ -568,8 +574,8 @@ static struct irq_domain_ops pm860x_irq_domain_ops = {
568574
static int device_irq_init(struct pm860x_chip *chip,
569575
struct pm860x_platform_data *pdata)
570576
{
571-
struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \
572-
: chip->companion;
577+
struct i2c_client *i2c = (chip->id == CHIP_PM8607) ?
578+
chip->client : chip->companion;
573579
unsigned char status_buf[INT_STATUS_NUM];
574580
unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
575581
int data, mask, ret = -EINVAL;
@@ -631,8 +637,8 @@ static int device_irq_init(struct pm860x_chip *chip,
631637
if (!chip->core_irq)
632638
goto out;
633639

634-
ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq, flags | IRQF_ONESHOT,
635-
"88pm860x", chip);
640+
ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq,
641+
flags | IRQF_ONESHOT, "88pm860x", chip);
636642
if (ret) {
637643
dev_err(chip->dev, "Failed to request IRQ: %d\n", ret);
638644
chip->core_irq = 0;
@@ -871,7 +877,7 @@ static void device_rtc_init(struct pm860x_chip *chip,
871877
{
872878
int ret;
873879

874-
if ((pdata == NULL))
880+
if (!pdata)
875881
return;
876882

877883
rtc_devs[0].platform_data = pdata->rtc;
@@ -997,8 +1003,9 @@ static void device_8607_init(struct pm860x_chip *chip,
9971003
ret);
9981004
break;
9991005
default:
1000-
dev_err(chip->dev, "Failed to detect Marvell 88PM8607. "
1001-
"Chip ID: %02x\n", ret);
1006+
dev_err(chip->dev,
1007+
"Failed to detect Marvell 88PM8607. Chip ID: %02x\n",
1008+
ret);
10021009
goto out;
10031010
}
10041011

@@ -1120,8 +1127,8 @@ static int pm860x_dt_init(struct device_node *np,
11201127
ret = of_property_read_u32(np, "marvell,88pm860x-slave-addr",
11211128
&pdata->companion_addr);
11221129
if (ret) {
1123-
dev_err(dev, "Not found \"marvell,88pm860x-slave-addr\" "
1124-
"property\n");
1130+
dev_err(dev,
1131+
"Not found \"marvell,88pm860x-slave-addr\" property\n");
11251132
pdata->companion_addr = 0;
11261133
}
11271134
return 0;

0 commit comments

Comments
 (0)