Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 875a7675 authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

nvmem: qcom-spmi-sdam: Enable multiple devices



Specifying the name of the nvmem device while registering it with the
nvmem framework has the side effect of causing the second instance of a
device using this driver to fail probe with the following error message:

  sysfs: cannot create duplicate filename '/bus/nvmem/devices/spmi_sdam'

Removing the name allows the nvmem framework to assign a monotonically
increasing integer id to each instance of this driver automatically,
like so:

  /sys/bus/nvmem/devices # ls
  nvmem0  nvmem1  nvmem2

Change-Id: I15acfad796babc4019cb0e6aa5ac4b880ce10f3e
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 4fbfcf83
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017, 2019-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/device.h>
@@ -137,8 +137,6 @@ static int sdam_probe(struct platform_device *pdev)
	sdam->size = val * 32;

	sdam_config->dev = &pdev->dev;
	sdam_config->name = "spmi_sdam";
	sdam_config->id = pdev->id;
	sdam_config->owner = THIS_MODULE,
	sdam_config->stride = 1;
	sdam_config->word_size = 1;