diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2015-03-06 11:41:36 -0500 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2015-03-07 08:58:28 -0500 |
commit | 34825e511971e193db16a96350faeb60eff0d842 (patch) | |
tree | 058226d06629b1ee9fed1523260ffb5ed9b27d47 | |
parent | f68a8342b1082d9a4b084cb085396e562899bc62 (diff) |
extcon: Fix the checkpatch warning
This patch fixes the checkpatch warning about coding style.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 5 | ||||
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 5 | ||||
-rw-r--r-- | drivers/extcon/extcon-max8997.c | 5 | ||||
-rw-r--r-- | drivers/extcon/extcon-rt8973a.c | 6 | ||||
-rw-r--r-- | drivers/extcon/extcon-sm5502.c | 6 | ||||
-rw-r--r-- | drivers/extcon/extcon-usb-gpio.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon.c | 1 |
7 files changed, 10 insertions, 20 deletions
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index c1bf0cf747b0..3823aa4a3a80 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c | |||
@@ -539,8 +539,6 @@ static void max14577_muic_irq_work(struct work_struct *work) | |||
539 | dev_err(info->dev, "failed to handle MUIC interrupt\n"); | 539 | dev_err(info->dev, "failed to handle MUIC interrupt\n"); |
540 | 540 | ||
541 | mutex_unlock(&info->mutex); | 541 | mutex_unlock(&info->mutex); |
542 | |||
543 | return; | ||
544 | } | 542 | } |
545 | 543 | ||
546 | /* | 544 | /* |
@@ -730,8 +728,7 @@ static int max14577_muic_probe(struct platform_device *pdev) | |||
730 | muic_irq->name, info); | 728 | muic_irq->name, info); |
731 | if (ret) { | 729 | if (ret) { |
732 | dev_err(&pdev->dev, | 730 | dev_err(&pdev->dev, |
733 | "failed: irq request (IRQ: %d," | 731 | "failed: irq request (IRQ: %d, error :%d)\n", |
734 | " error :%d)\n", | ||
735 | muic_irq->irq, ret); | 732 | muic_irq->irq, ret); |
736 | return ret; | 733 | return ret; |
737 | } | 734 | } |
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index dfcc5cba25f0..a66bec8f6252 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c | |||
@@ -1019,8 +1019,6 @@ static void max77693_muic_irq_work(struct work_struct *work) | |||
1019 | dev_err(info->dev, "failed to handle MUIC interrupt\n"); | 1019 | dev_err(info->dev, "failed to handle MUIC interrupt\n"); |
1020 | 1020 | ||
1021 | mutex_unlock(&info->mutex); | 1021 | mutex_unlock(&info->mutex); |
1022 | |||
1023 | return; | ||
1024 | } | 1022 | } |
1025 | 1023 | ||
1026 | static irqreturn_t max77693_muic_irq_handler(int irq, void *data) | 1024 | static irqreturn_t max77693_muic_irq_handler(int irq, void *data) |
@@ -1171,8 +1169,7 @@ static int max77693_muic_probe(struct platform_device *pdev) | |||
1171 | muic_irq->name, info); | 1169 | muic_irq->name, info); |
1172 | if (ret) { | 1170 | if (ret) { |
1173 | dev_err(&pdev->dev, | 1171 | dev_err(&pdev->dev, |
1174 | "failed: irq request (IRQ: %d," | 1172 | "failed: irq request (IRQ: %d, error :%d)\n", |
1175 | " error :%d)\n", | ||
1176 | muic_irq->irq, ret); | 1173 | muic_irq->irq, ret); |
1177 | return ret; | 1174 | return ret; |
1178 | } | 1175 | } |
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index fc1678fa95c4..5774e56c6422 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c | |||
@@ -579,8 +579,6 @@ static void max8997_muic_irq_work(struct work_struct *work) | |||
579 | dev_err(info->dev, "failed to handle MUIC interrupt\n"); | 579 | dev_err(info->dev, "failed to handle MUIC interrupt\n"); |
580 | 580 | ||
581 | mutex_unlock(&info->mutex); | 581 | mutex_unlock(&info->mutex); |
582 | |||
583 | return; | ||
584 | } | 582 | } |
585 | 583 | ||
586 | static irqreturn_t max8997_muic_irq_handler(int irq, void *data) | 584 | static irqreturn_t max8997_muic_irq_handler(int irq, void *data) |
@@ -689,8 +687,7 @@ static int max8997_muic_probe(struct platform_device *pdev) | |||
689 | muic_irq->name, info); | 687 | muic_irq->name, info); |
690 | if (ret) { | 688 | if (ret) { |
691 | dev_err(&pdev->dev, | 689 | dev_err(&pdev->dev, |
692 | "failed: irq request (IRQ: %d," | 690 | "failed: irq request (IRQ: %d, error :%d)\n", |
693 | " error :%d)\n", | ||
694 | muic_irq->irq, ret); | 691 | muic_irq->irq, ret); |
695 | goto err_irq; | 692 | goto err_irq; |
696 | } | 693 | } |
diff --git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c index a784b2d5ee72..9ccd5af89d1c 100644 --- a/drivers/extcon/extcon-rt8973a.c +++ b/drivers/extcon/extcon-rt8973a.c | |||
@@ -582,10 +582,8 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c, | |||
582 | return -EINVAL; | 582 | return -EINVAL; |
583 | 583 | ||
584 | info = devm_kzalloc(&i2c->dev, sizeof(*info), GFP_KERNEL); | 584 | info = devm_kzalloc(&i2c->dev, sizeof(*info), GFP_KERNEL); |
585 | if (!info) { | 585 | if (!info) |
586 | dev_err(&i2c->dev, "failed to allocate memory\n"); | ||
587 | return -ENOMEM; | 586 | return -ENOMEM; |
588 | } | ||
589 | i2c_set_clientdata(i2c, info); | 587 | i2c_set_clientdata(i2c, info); |
590 | 588 | ||
591 | info->dev = &i2c->dev; | 589 | info->dev = &i2c->dev; |
@@ -681,7 +679,7 @@ static int rt8973a_muic_i2c_remove(struct i2c_client *i2c) | |||
681 | return 0; | 679 | return 0; |
682 | } | 680 | } |
683 | 681 | ||
684 | static struct of_device_id rt8973a_dt_match[] = { | 682 | static const struct of_device_id rt8973a_dt_match[] = { |
685 | { .compatible = "richtek,rt8973a-muic" }, | 683 | { .compatible = "richtek,rt8973a-muic" }, |
686 | { }, | 684 | { }, |
687 | }; | 685 | }; |
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c index b0f7bd82af90..2f93cf307852 100644 --- a/drivers/extcon/extcon-sm5502.c +++ b/drivers/extcon/extcon-sm5502.c | |||
@@ -359,8 +359,8 @@ static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info) | |||
359 | break; | 359 | break; |
360 | default: | 360 | default: |
361 | dev_dbg(info->dev, | 361 | dev_dbg(info->dev, |
362 | "cannot identify the cable type: adc(0x%x) " | 362 | "cannot identify the cable type: adc(0x%x)\n", |
363 | "dev_type1(0x%x)\n", adc, dev_type1); | 363 | adc); |
364 | return -EINVAL; | 364 | return -EINVAL; |
365 | }; | 365 | }; |
366 | break; | 366 | break; |
@@ -659,7 +659,7 @@ static int sm5502_muic_i2c_remove(struct i2c_client *i2c) | |||
659 | return 0; | 659 | return 0; |
660 | } | 660 | } |
661 | 661 | ||
662 | static struct of_device_id sm5502_dt_match[] = { | 662 | static const struct of_device_id sm5502_dt_match[] = { |
663 | { .compatible = "siliconmitus,sm5502-muic" }, | 663 | { .compatible = "siliconmitus,sm5502-muic" }, |
664 | { }, | 664 | { }, |
665 | }; | 665 | }; |
diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index 3f0bad3ce8aa..de67fce18984 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c | |||
@@ -214,7 +214,7 @@ static int usb_extcon_resume(struct device *dev) | |||
214 | static SIMPLE_DEV_PM_OPS(usb_extcon_pm_ops, | 214 | static SIMPLE_DEV_PM_OPS(usb_extcon_pm_ops, |
215 | usb_extcon_suspend, usb_extcon_resume); | 215 | usb_extcon_suspend, usb_extcon_resume); |
216 | 216 | ||
217 | static struct of_device_id usb_extcon_dt_match[] = { | 217 | static const struct of_device_id usb_extcon_dt_match[] = { |
218 | { .compatible = "linux,extcon-usb-gpio", }, | 218 | { .compatible = "linux,extcon-usb-gpio", }, |
219 | { /* sentinel */ } | 219 | { /* sentinel */ } |
220 | }; | 220 | }; |
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index 8319f25b7145..752ce1208428 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c | |||
@@ -158,6 +158,7 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr, | |||
158 | /* Optional callback given by the user */ | 158 | /* Optional callback given by the user */ |
159 | if (edev->print_name) { | 159 | if (edev->print_name) { |
160 | int ret = edev->print_name(edev, buf); | 160 | int ret = edev->print_name(edev, buf); |
161 | |||
161 | if (ret >= 0) | 162 | if (ret >= 0) |
162 | return ret; | 163 | return ret; |
163 | } | 164 | } |