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]
Date:	Thu, 31 Mar 2011 09:53:12 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Shawn Guo <shawn.guo@...aro.org>
Cc:	devicetree-discuss@...ts.ozlabs.org, linux-mmc@...r.kernel.org,
	patches@...aro.org, linaro-dev@...ts.linaro.org,
	linux-kernel@...r.kernel.org, sameo@...ux.intel.com
Subject: Re: [PATCH 4/5] mmc: sdhci: consolidate sdhci-of-esdhc and
 sdhci-esdhc-imx

On Fri, Mar 25, 2011 at 04:48:50PM +0800, Shawn Guo wrote:
> This patch is to consolidate SDHCI driver for Freescale eSDHC
> controller found on both MPCxxx and i.MX platforms.  It turns
> sdhci-of-esdhc.c and sdhci-esdhc-imx.c into one sdhci-esdhc.c,
> which gets the same pair of .probe and .remove serving two cases.
> 
> Signed-off-by: Shawn Guo <shawn.guo@...aro.org>
> ---
>  drivers/mmc/host/Kconfig           |   38 ++--
>  drivers/mmc/host/Makefile          |    3 +-
>  drivers/mmc/host/sdhci-esdhc-imx.c |  210 ------------------
>  drivers/mmc/host/sdhci-esdhc.c     |  413 ++++++++++++++++++++++++++++++++++++
>  drivers/mmc/host/sdhci-of-esdhc.c  |  162 --------------

This patch would be easier to review if it was split into two patches;
first rename sdhci-esdhc-imx.c to sdhci-esdhc.c without any changes to
the .c code, and then a second patch to merge the ppc bits into the
imx version.

> +#if defined(CONFIG_OF)
> +#include <linux/of_device.h>
> +static const struct of_device_id sdhci_esdhc_dt_ids[] = {
> +#ifdef CONFIG_MMC_SDHCI_ESDHC_IMX
> +	{ .compatible = "fsl,imx-esdhc", .data = &sdhci_esdhc_imx_pdata },
> +#endif
> +#ifdef CONFIG_MMC_SDHCI_ESDHC_MPC
> +	{ .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc_mpc_pdata },
> +	{ .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc_mpc_pdata },
> +	{ .compatible = "fsl,esdhc", .data = &sdhci_esdhc_mpc_pdata },
> +#endif
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(platform, sdhci_esdhc_dt_ids);
> +
> +static const struct of_device_id *
> +sdhci_esdhc_get_of_device_id(struct platform_device *pdev)
> +{
> +	return of_match_device(sdhci_esdhc_dt_ids, &pdev->dev);

You can add an empty implementation of of_match_device() to
linux/of_device.h.  That would eliminate the need for this function.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ