mfd: sm5504: Remove build warnings 74/159574/2
authorWook Song <wook16.song@samsung.com>
Fri, 10 Nov 2017 00:37:02 +0000 (09:37 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 10 Nov 2017 01:51:51 +0000 (01:51 +0000)
This patch removes build warnings caused by unused varibles and
functions.

Change-Id: I925a2bd95c204267106372e35080abfe0519ee44
Signed-off-by: Wook Song <wook16.song@samsung.com>
drivers/mfd/sm5504.c

index e0246659788a6cd73bc23bbc87a6a14a43f73e5d..528218266798d82c015e69d678881610a19e1dc8 100644 (file)
@@ -1685,7 +1685,7 @@ static struct attribute *sm5504_muic_attributes[] = {
 static const struct attribute_group sm5504_muic_group = {
         .attrs = sm5504_muic_attributes,
 };
-static int sec_get_usb_vbus(unsigned int *level)
+static __maybe_unused int sec_get_usb_vbus(unsigned int *level)
 {
        if (current_status->vbus_status) {
                RTINFO("set VBUS_HIGH\n");
@@ -1721,10 +1721,8 @@ static int sm5504_probe(struct i2c_client *client,
 {
        struct sm5504_platform_data *pdata;
        struct sm5504_chip *chip;
-#ifdef CONFIG_MUIC_SUPPORT_FACTORY
-       struct device *switch_dev;
-#endif
        int ret;
+
        RTINFO("SiliconMitus SM5504 driver %s probing...\n", SM5504_DRV_VER);
        if(client->dev.of_node) {
                pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
@@ -1811,8 +1809,7 @@ static int sm5504_probe(struct i2c_client *client,
 #endif
 
 #ifdef CONFIG_SAMSUNG_MUIC
-       switch_dev = device_create(sec_class, NULL, 0, NULL, "switch");
-       chip->switch_dev = switch_dev;
+       chip->switch_dev = device_create(sec_class, NULL, 0, NULL, "switch");
        ret = sysfs_create_group(&switch_dev->kobj, &sm5504_muic_group);
 #elif defined(CONFIG_MUIC_SUPPORT_FACTORY) && !defined(CONFIG_USB_SPRD_SWITCH)
        if(switch_device) {