diff options
author | Guru Das Srinagesh <gurus@codeaurora.org> | 2020-07-22 13:07:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-29 18:12:09 +0300 |
commit | 8f042191d430f4144d23ebc2206e8cf73e6b1cbf (patch) | |
tree | c2fa3ae75fd5ad074daa85c4d78a77558ea9ae9d /drivers/nvmem | |
parent | fa2dc6049afbd90301de5c26e0626dc695000589 (diff) | |
download | linux-8f042191d430f4144d23ebc2206e8cf73e6b1cbf.tar.xz |
nvmem: qcom-spmi-sdam: Enable multiple devices
Using pdev->id as the nvmem's config ID (which, by default, is
NVMEM_DEVID_NONE) prevents multiple instances of this driver from
probing because of the following error:
sysfs: cannot create duplicate filename '/bus/nvmem/devices/spmi_sdam'
Use NVMEM_DEVID_AUTO as the NVMEM config ID to fix the issue.
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200722100705.7772-15-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/qcom-spmi-sdam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c index 8682cda448d6..a72704cd0468 100644 --- a/drivers/nvmem/qcom-spmi-sdam.c +++ b/drivers/nvmem/qcom-spmi-sdam.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2017, 2020 The Linux Foundation. All rights reserved. */ #include <linux/device.h> @@ -141,7 +141,7 @@ static int sdam_probe(struct platform_device *pdev) sdam->sdam_config.dev = &pdev->dev; sdam->sdam_config.name = "spmi_sdam"; - sdam->sdam_config.id = pdev->id; + sdam->sdam_config.id = NVMEM_DEVID_AUTO; sdam->sdam_config.owner = THIS_MODULE, sdam->sdam_config.stride = 1; sdam->sdam_config.word_size = 1; |