Skip to content

Commit 8f04219

Browse files
Guru Das Srinageshgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fa2dc60 commit 8f04219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nvmem/qcom-spmi-sdam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
3-
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
3+
* Copyright (c) 2017, 2020 The Linux Foundation. All rights reserved.
44
*/
55

66
#include <linux/device.h>
@@ -141,7 +141,7 @@ static int sdam_probe(struct platform_device *pdev)
141141

142142
sdam->sdam_config.dev = &pdev->dev;
143143
sdam->sdam_config.name = "spmi_sdam";
144-
sdam->sdam_config.id = pdev->id;
144+
sdam->sdam_config.id = NVMEM_DEVID_AUTO;
145145
sdam->sdam_config.owner = THIS_MODULE,
146146
sdam->sdam_config.stride = 1;
147147
sdam->sdam_config.word_size = 1;

0 commit comments

Comments
 (0)