diff options
-rw-r--r-- | drivers/nvmem/core.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 5a5cefd12153..93084ab61e0f 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c | |||
@@ -600,16 +600,11 @@ static void __nvmem_device_put(struct nvmem_device *nvmem) | |||
600 | mutex_unlock(&nvmem_mutex); | 600 | mutex_unlock(&nvmem_mutex); |
601 | } | 601 | } |
602 | 602 | ||
603 | static int nvmem_match(struct device *dev, void *data) | ||
604 | { | ||
605 | return !strcmp(dev_name(dev), data); | ||
606 | } | ||
607 | |||
608 | static struct nvmem_device *nvmem_find(const char *name) | 603 | static struct nvmem_device *nvmem_find(const char *name) |
609 | { | 604 | { |
610 | struct device *d; | 605 | struct device *d; |
611 | 606 | ||
612 | d = bus_find_device(&nvmem_bus_type, NULL, (void *)name, nvmem_match); | 607 | d = bus_find_device_by_name(&nvmem_bus_type, NULL, name); |
613 | 608 | ||
614 | if (!d) | 609 | if (!d) |
615 | return NULL; | 610 | return NULL; |