mmc: host: simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
909b345665
commit
970f2d90be
@ -1377,8 +1377,7 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev)
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int davinci_mmcsd_suspend(struct device *dev)
|
static int davinci_mmcsd_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct mmc_davinci_host *host = dev_get_drvdata(dev);
|
||||||
struct mmc_davinci_host *host = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
writel(0, host->base + DAVINCI_MMCIM);
|
writel(0, host->base + DAVINCI_MMCIM);
|
||||||
mmc_davinci_reset_ctrl(host, 1);
|
mmc_davinci_reset_ctrl(host, 1);
|
||||||
@ -1389,8 +1388,7 @@ static int davinci_mmcsd_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int davinci_mmcsd_resume(struct device *dev)
|
static int davinci_mmcsd_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct mmc_davinci_host *host = dev_get_drvdata(dev);
|
||||||
struct mmc_davinci_host *host = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
clk_enable(host->clk);
|
clk_enable(host->clk);
|
||||||
mmc_davinci_reset_ctrl(host, 0);
|
mmc_davinci_reset_ctrl(host, 0);
|
||||||
|
@ -360,8 +360,7 @@ static const struct sdhci_pltfm_data sdhci_arasan_cqe_pdata = {
|
|||||||
*/
|
*/
|
||||||
static int sdhci_arasan_suspend(struct device *dev)
|
static int sdhci_arasan_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
||||||
struct sdhci_host *host = platform_get_drvdata(pdev);
|
|
||||||
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host);
|
struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host);
|
||||||
int ret;
|
int ret;
|
||||||
@ -404,8 +403,7 @@ static int sdhci_arasan_suspend(struct device *dev)
|
|||||||
*/
|
*/
|
||||||
static int sdhci_arasan_resume(struct device *dev)
|
static int sdhci_arasan_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
||||||
struct sdhci_host *host = platform_get_drvdata(pdev);
|
|
||||||
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host);
|
struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host);
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -928,8 +928,7 @@ static int wmt_mci_remove(struct platform_device *pdev)
|
|||||||
static int wmt_mci_suspend(struct device *dev)
|
static int wmt_mci_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
u32 reg_tmp;
|
u32 reg_tmp;
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct mmc_host *mmc = dev_get_drvdata(dev);
|
||||||
struct mmc_host *mmc = platform_get_drvdata(pdev);
|
|
||||||
struct wmt_mci_priv *priv;
|
struct wmt_mci_priv *priv;
|
||||||
|
|
||||||
if (!mmc)
|
if (!mmc)
|
||||||
@ -953,8 +952,7 @@ static int wmt_mci_suspend(struct device *dev)
|
|||||||
static int wmt_mci_resume(struct device *dev)
|
static int wmt_mci_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
u32 reg_tmp;
|
u32 reg_tmp;
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct mmc_host *mmc = dev_get_drvdata(dev);
|
||||||
struct mmc_host *mmc = platform_get_drvdata(pdev);
|
|
||||||
struct wmt_mci_priv *priv;
|
struct wmt_mci_priv *priv;
|
||||||
|
|
||||||
if (mmc) {
|
if (mmc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user