Message ID | 20201008020936.19894-4-muhammad.husaini.zulkifli@intel.com |
---|---|
State | New |
Headers | show |
Series | mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC | expand |
On 08. 10. 20 4:09, muhammad.husaini.zulkifli@intel.com wrote: > From: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> > > Add struct device *dev in probe func() so that it can widely use in > probe to make code more readable. > > Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> > --- > drivers/mmc/host/sdhci-of-arasan.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c > index f186fbd016b1..46aea6516133 100644 > --- a/drivers/mmc/host/sdhci-of-arasan.c > +++ b/drivers/mmc/host/sdhci-of-arasan.c > @@ -1521,6 +1521,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) > struct sdhci_pltfm_host *pltfm_host; > struct sdhci_arasan_data *sdhci_arasan; > struct device_node *np = pdev->dev.of_node; > + struct device *dev = &pdev->dev; > const struct sdhci_arasan_of_data *data; > > match = of_match_node(sdhci_arasan_of_match, pdev->dev.of_node); > This is not what we discussed. You create new variable and you should just use it in that function. s/pdev->dev\./dev->/g Thanks, Michal
Hi Michal, Thanks for the comment. I replied inline >-----Original Message----- >From: Michal Simek <michal.simek@xilinx.com> >Sent: Thursday, October 8, 2020 3:35 PM >To: Zulkifli, Muhammad Husaini <muhammad.husaini.zulkifli@intel.com>; >Hunter, Adrian <adrian.hunter@intel.com>; michal.simek@xilinx.com; >Shevchenko, Andriy <andriy.shevchenko@intel.com>; ulf.hansson@linaro.org; >linux-mmc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux- >kernel@vger.kernel.org >Cc: Raja Subramanian, Lakshmi Bai <lakshmi.bai.raja.subramanian@intel.com>; >Wan Mohamad, Wan Ahmad Zainie ><wan.ahmad.zainie.wan.mohamad@intel.com>; arnd@arndb.de >Subject: Re: [PATCH v4 3/4] mmc: sdhci-of-arasan: Add structure device pointer >in probe > > > >On 08. 10. 20 4:09, muhammad.husaini.zulkifli@intel.com wrote: >> From: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> >> >> Add struct device *dev in probe func() so that it can widely use in >> probe to make code more readable. >> >> Signed-off-by: Muhammad Husaini Zulkifli >> <muhammad.husaini.zulkifli@intel.com> >> --- >> drivers/mmc/host/sdhci-of-arasan.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/mmc/host/sdhci-of-arasan.c >> b/drivers/mmc/host/sdhci-of-arasan.c >> index f186fbd016b1..46aea6516133 100644 >> --- a/drivers/mmc/host/sdhci-of-arasan.c >> +++ b/drivers/mmc/host/sdhci-of-arasan.c >> @@ -1521,6 +1521,7 @@ static int sdhci_arasan_probe(struct >platform_device *pdev) >> struct sdhci_pltfm_host *pltfm_host; >> struct sdhci_arasan_data *sdhci_arasan; >> struct device_node *np = pdev->dev.of_node; >> + struct device *dev = &pdev->dev; >> const struct sdhci_arasan_of_data *data; >> >> match = of_match_node(sdhci_arasan_of_match, pdev->dev.of_node); >> > >This is not what we discussed. You create new variable and you should just use it >in that function. > >s/pdev->dev\./dev->/g For widely used in future, we plan to put it here and not specific to Keembay function only. Any comment on this @Andy Shevchenko? Thanks > >Thanks, >Michal
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index f186fbd016b1..46aea6516133 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -1521,6 +1521,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) struct sdhci_pltfm_host *pltfm_host; struct sdhci_arasan_data *sdhci_arasan; struct device_node *np = pdev->dev.of_node; + struct device *dev = &pdev->dev; const struct sdhci_arasan_of_data *data; match = of_match_node(sdhci_arasan_of_match, pdev->dev.of_node);