nvmem: remove the name field from struct nvmem_device
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 21 Sep 2018 13:40:04 +0000 (06:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Sep 2018 13:14:53 +0000 (15:14 +0200)
This field is never set and is only used in a single error message.
Remove the field and use nvmem_dev_name() instead.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c

index 11afa3b..72313a1 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/slab.h>
 
 struct nvmem_device {
-       const char              *name;
        struct module           *owner;
        struct device           dev;
        int                     stride;
@@ -652,7 +651,7 @@ static struct nvmem_device *__nvmem_device_get(struct device_node *np,
        if (!try_module_get(nvmem->owner)) {
                dev_err(&nvmem->dev,
                        "could not increase module refcount for cell %s\n",
-                       nvmem->name);
+                       nvmem_dev_name(nvmem));
 
                mutex_lock(&nvmem_mutex);
                nvmem->users--;