From: Grant Likely <grant.likely@secretlab.ca>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org, linux-mmc@vger.kernel.org,
patches@linaro.org, linaro-dev@lists.linaro.org,
linux-kernel@vger.kernel.org, sameo@linux.intel.com
Subject: Re: [PATCH 4/5] mmc: sdhci: consolidate sdhci-of-esdhc and sdhci-esdhc-imx
Date: Thu, 31 Mar 2011 09:53:12 -0600 [thread overview]
Message-ID: <20110331155312.GC26709@ponder.secretlab.ca> (raw)
In-Reply-To: <1301042931-4869-5-git-send-email-shawn.guo@linaro.org>
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@linaro.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.
next prev parent reply other threads:[~2011-03-31 15:53 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 8:48 [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered Shawn Guo
2011-03-25 8:48 ` [PATCH 1/5] mmc: sdhci: make sdhci-pltfm device drivers " Shawn Guo
2011-03-31 15:33 ` Grant Likely
2011-04-01 6:10 ` Shawn Guo
2011-04-19 10:20 ` Wolfram Sang
2011-04-21 8:03 ` Shawn Guo
2011-04-21 9:57 ` Wolfram Sang
2011-03-25 8:48 ` [PATCH 2/5] mmc: sdhci: eliminate sdhci_of_host and sdhci_of_data Shawn Guo
2011-03-31 15:34 ` Grant Likely
2011-04-19 10:20 ` Wolfram Sang
2011-04-21 8:10 ` Shawn Guo
2011-03-25 8:48 ` [PATCH 3/5] mmc: sdhci: make sdhci-of device drivers self registered Shawn Guo
2011-03-31 15:38 ` Grant Likely
2011-04-19 10:21 ` Wolfram Sang
2011-04-21 8:17 ` Shawn Guo
2011-03-25 8:48 ` [PATCH 4/5] mmc: sdhci: consolidate sdhci-of-esdhc and sdhci-esdhc-imx Shawn Guo
2011-03-31 15:53 ` Grant Likely [this message]
2011-04-01 6:18 ` Shawn Guo
2011-04-19 10:21 ` Wolfram Sang
2011-04-21 8:53 ` Shawn Guo
2011-03-25 8:48 ` [PATCH 5/5] mmc: sdhci: merge two sdhci-pltfm.h into one Shawn Guo
2011-03-31 15:54 ` Grant Likely
2011-04-19 10:21 ` Wolfram Sang
2011-03-31 4:25 ` [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered Shawn Guo
2011-03-31 16:36 ` Chris Ball
2011-04-13 6:26 ` Shawn Guo
2011-04-19 10:20 ` Wolfram Sang
2011-04-19 12:47 ` Kyungmin Park
2011-04-19 17:47 ` Wolfram Sang
2011-04-20 4:23 ` Kyungmin Park
2011-04-21 7:48 ` Shawn Guo
2011-04-26 13:20 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110331155312.GC26709@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sameo@linux.intel.com \
--cc=shawn.guo@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).