diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2023-12-19 13:01:04 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-04 17:01:13 +0100 |
commit | 43f60e3fb62edc7bd8891de8779fb422f4ae23ae (patch) | |
tree | 9d0babad93481fe39a2cd25be365620a4d8a0ac2 /drivers/nvmem | |
parent | nvmem: layouts: refactor .add_cells() callback arguments (diff) | |
download | linux-43f60e3fb62edc7bd8891de8779fb422f4ae23ae.tar.xz linux-43f60e3fb62edc7bd8891de8779fb422f4ae23ae.zip |
nvmem: drop nvmem_layout_get_match_data()
Thanks for layouts refactoring we now have "struct device" associated
with layout. Also its OF pointer points directly to the "nvmem-layout"
DT node.
All it takes to get match data is a generic of_device_get_match_data().
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20231219120104.3422-2-zajec5@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/core.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 441d132ebb61..4ed54076346d 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -876,19 +876,6 @@ void nvmem_layout_unregister(struct nvmem_layout *layout) } EXPORT_SYMBOL_GPL(nvmem_layout_unregister); -const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem, - struct nvmem_layout *layout) -{ - struct device_node __maybe_unused *layout_np; - const struct of_device_id *match; - - layout_np = of_nvmem_layout_get_container(nvmem); - match = of_match_node(layout->dev.driver->of_match_table, layout_np); - - return match ? match->data : NULL; -} -EXPORT_SYMBOL_GPL(nvmem_layout_get_match_data); - /** * nvmem_register() - Register a nvmem device for given nvmem_config. * Also creates a binary entry in /sys/bus/nvmem/devices/dev-name/nvmem |