extcon: Fix the checkpatch warning
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 6 Mar 2015 16:41:36 +0000 (01:41 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Sat, 7 Mar 2015 13:58:28 +0000 (22:58 +0900)
This patch fixes the checkpatch warning about coding style.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-max14577.c
drivers/extcon/extcon-max77693.c
drivers/extcon/extcon-max8997.c
drivers/extcon/extcon-rt8973a.c
drivers/extcon/extcon-sm5502.c
drivers/extcon/extcon-usb-gpio.c
drivers/extcon/extcon.c

index c1bf0cf747b09fc7e414aecf8349cb5e5a449878..3823aa4a3a8093631c616131dd9c06fc7a77ce33 100644 (file)
@@ -539,8 +539,6 @@ static void max14577_muic_irq_work(struct work_struct *work)
                dev_err(info->dev, "failed to handle MUIC interrupt\n");
 
        mutex_unlock(&info->mutex);
-
-       return;
 }
 
 /*
@@ -730,8 +728,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
                                muic_irq->name, info);
                if (ret) {
                        dev_err(&pdev->dev,
-                               "failed: irq request (IRQ: %d,"
-                               " error :%d)\n",
+                               "failed: irq request (IRQ: %d, error :%d)\n",
                                muic_irq->irq, ret);
                        return ret;
                }
index dfcc5cba25f0cda890a7d1abb697d92cde24d180..a66bec8f6252dc140fbe6919b3cb846740f70a64 100644 (file)
@@ -1019,8 +1019,6 @@ static void max77693_muic_irq_work(struct work_struct *work)
                dev_err(info->dev, "failed to handle MUIC interrupt\n");
 
        mutex_unlock(&info->mutex);
-
-       return;
 }
 
 static irqreturn_t max77693_muic_irq_handler(int irq, void *data)
@@ -1171,8 +1169,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
                                muic_irq->name, info);
                if (ret) {
                        dev_err(&pdev->dev,
-                               "failed: irq request (IRQ: %d,"
-                               " error :%d)\n",
+                               "failed: irq request (IRQ: %d, error :%d)\n",
                                muic_irq->irq, ret);
                        return ret;
                }
index fc1678fa95c4cd258401a1eee871c8ed8ee6f59f..5774e56c64222a43f21eb28e9baeecc79bc176e1 100644 (file)
@@ -579,8 +579,6 @@ static void max8997_muic_irq_work(struct work_struct *work)
                dev_err(info->dev, "failed to handle MUIC interrupt\n");
 
        mutex_unlock(&info->mutex);
-
-       return;
 }
 
 static irqreturn_t max8997_muic_irq_handler(int irq, void *data)
@@ -689,8 +687,7 @@ static int max8997_muic_probe(struct platform_device *pdev)
                                muic_irq->name, info);
                if (ret) {
                        dev_err(&pdev->dev,
-                               "failed: irq request (IRQ: %d,"
-                               " error :%d)\n",
+                               "failed: irq request (IRQ: %d, error :%d)\n",
                                muic_irq->irq, ret);
                        goto err_irq;
                }
index a784b2d5ee72b57fb1537438a661c7ead9d88f15..9ccd5af89d1c058bab1564340f63a337a7d17c47 100644 (file)
@@ -582,10 +582,8 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
                return -EINVAL;
 
        info = devm_kzalloc(&i2c->dev, sizeof(*info), GFP_KERNEL);
-       if (!info) {
-               dev_err(&i2c->dev, "failed to allocate memory\n");
+       if (!info)
                return -ENOMEM;
-       }
        i2c_set_clientdata(i2c, info);
 
        info->dev = &i2c->dev;
@@ -681,7 +679,7 @@ static int rt8973a_muic_i2c_remove(struct i2c_client *i2c)
        return 0;
 }
 
-static struct of_device_id rt8973a_dt_match[] = {
+static const struct of_device_id rt8973a_dt_match[] = {
        { .compatible = "richtek,rt8973a-muic" },
        { },
 };
index b0f7bd82af90436d7e433a7350f80195f57d7e52..2f93cf3078521e7c2f635ed9320b1d7984a383e5 100644 (file)
@@ -359,8 +359,8 @@ static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
                        break;
                default:
                        dev_dbg(info->dev,
-                               "cannot identify the cable type: adc(0x%x) "
-                               "dev_type1(0x%x)\n", adc, dev_type1);
+                               "cannot identify the cable type: adc(0x%x)\n",
+                               adc);
                        return -EINVAL;
                };
                break;
@@ -659,7 +659,7 @@ static int sm5502_muic_i2c_remove(struct i2c_client *i2c)
        return 0;
 }
 
-static struct of_device_id sm5502_dt_match[] = {
+static const struct of_device_id sm5502_dt_match[] = {
        { .compatible = "siliconmitus,sm5502-muic" },
        { },
 };
index 3f0bad3ce8aa8708fc0c7ebb64937e681e6add5a..de67fce189840eee2d75ad42e23f862103d7540b 100644 (file)
@@ -214,7 +214,7 @@ static int usb_extcon_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(usb_extcon_pm_ops,
                         usb_extcon_suspend, usb_extcon_resume);
 
-static struct of_device_id usb_extcon_dt_match[] = {
+static const struct of_device_id usb_extcon_dt_match[] = {
        { .compatible = "linux,extcon-usb-gpio", },
        { /* sentinel */ }
 };
index 8319f25b7145fb6c5dbe1d1f31fa384b1e086b7b..752ce1208428f19521c8a3535bc945c02c38267e 100644 (file)
@@ -158,6 +158,7 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr,
        /* Optional callback given by the user */
        if (edev->print_name) {
                int ret = edev->print_name(edev, buf);
+
                if (ret >= 0)
                        return ret;
        }