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] [thread-next>] [day] [month] [year] [list]
Message-ID: <eeb70bd9-e347-4d19-a597-bd7857b96306@intel.com>
Date:   Mon, 9 Oct 2023 19:58:50 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] mmc: sdhci-pltfm: Make driver OF independent

On 6/10/23 13:58, Andy Shevchenko wrote:
> Since we have device_is_compatible() API, drop OF dependency
> in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Acked-by: Adrian Hunter <adrian.hunter@...el.com>

> ---
>  drivers/mmc/host/sdhci-pltfm.c | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 4d1a703a5bdb..62753d72198a 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -19,7 +19,6 @@
>  #include <linux/err.h>
>  #include <linux/module.h>
>  #include <linux/property.h>
> -#include <linux/of.h>
>  #ifdef CONFIG_PPC
>  #include <asm/machdep.h>
>  #endif
> @@ -56,19 +55,16 @@ static bool sdhci_wp_inverted(struct device *dev)
>  
>  static void sdhci_get_compatibility(struct platform_device *pdev)
>  {
> +	struct device *dev = &pdev->dev;
>  	struct sdhci_host *host = platform_get_drvdata(pdev);
> -	struct device_node *np = pdev->dev.of_node;
>  
> -	if (!np)
> -		return;
> -
> -	if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
> +	if (device_is_compatible(dev, "fsl,p2020-rev1-esdhc"))
>  		host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
>  
> -	if (of_device_is_compatible(np, "fsl,p2020-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,p1010-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,t4240-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
> +	if (device_is_compatible(dev, "fsl,p2020-esdhc") ||
> +	    device_is_compatible(dev, "fsl,p1010-esdhc") ||
> +	    device_is_compatible(dev, "fsl,t4240-esdhc") ||
> +	    device_is_compatible(dev, "fsl,mpc8536-esdhc"))
>  		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ