lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a81a3563-1a87-d302-054e-bc20db8de1e7@linaro.org>
Date:   Wed, 22 Jul 2020 10:32:49 +0100
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Guru Das Srinagesh <gurus@...eaurora.org>,
        linux-arm-msm@...r.kernel.org
Cc:     Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        David Collins <collinsd@...eaurora.org>,
        Anirudh Ghayal <aghayal@...eaurora.org>,
        Shyam Kumar Thella <sthella@...eaurora.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] nvmem: qcom-spmi-sdam: Enable multiple devices



On 21/07/2020 20:46, Guru Das Srinagesh wrote:
> 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@...eaurora.org>
> ---
>   drivers/nvmem/qcom-spmi-sdam.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Applied thanks,

--srini
> 
> diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c
> index 8682cda..a72704c 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;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ