mfd: syscon: Simplify syscon_match_pdevname()
authorAlexander Shiyan <shc_work@mail.ru>
Mon, 10 Mar 2014 10:57:33 +0000 (14:57 +0400)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Mar 2014 08:58:41 +0000 (08:58 +0000)
Since we do not want to add new platform IDs for the syscon driver,
there is no reason to iterate over IDs. This patch simplifies
syscon_match_pdevname() function to remove such iteration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/syscon.c

index 26200565d6ab04e3577997d84aec48520da6a708..dbea55de4397d5055da2b3fe39283fa36abea1f1 100644 (file)
@@ -69,13 +69,6 @@ EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible);
 
 static int syscon_match_pdevname(struct device *dev, void *data)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       const struct platform_device_id *id = platform_get_device_id(pdev);
-
-       if (id)
-               if (!strcmp(id->name, (const char *)data))
-                       return 1;
-
        return !strcmp(dev_name(dev), (const char *)data);
 }