Skip to contentSkip to conversation

mmc: davinci: order includes alphabetically

PATCH In review Bartosz Golaszewski 2 participants 4 messages Oct 7, 2024 – Oct 8, 2024 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: davinci: order includes alphabetically

From: Bartosz Golaszewski <[email protected]>

For better readability, put all header inclusions in alphabetical order.

---
 drivers/mmc/host/davinci_mmc.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
drivers/mmc/host/davinci_mmc.c +11 -12
index 7ed533758dbe..fe7712532e84 100644
@@ -7,24 +7,23 @@
  * Copyright (C) 2009 David Brownell
  */
 
-#include <linux/module.h>
-#include <linux/ioport.h>
-#include <linux/platform_device.h>
 #include <linux/clk.h>
-#include <linux/err.h>
 #include <linux/cpufreq.h>
-#include <linux/mmc/host.h>
-#include <linux/io.h>
-#include <linux/irq.h>
 #include <linux/delay.h>
-#include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
-#include <linux/mmc/mmc.h>
-#include <linux/of.h>
-#include <linux/mmc/slot-gpio.h>
+#include <linux/dmaengine.h>
+#include <linux/err.h>
 #include <linux/interrupt.h>
-
+#include <linux/io.h>
+#include <linux/ioport.h>
+#include <linux/irq.h>
+#include <linux/mmc/host.h>
+#include <linux/mmc/mmc.h>
+#include <linux/mmc/slot-gpio.h>
+#include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_device.h>
 
 /*
  * Register Definitions
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 mmc: davinci: use generic device_get_match_data()

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use the OF-specific variant so switch to using the generic device_get_match_data() helper instead.

---
 drivers/mmc/host/davinci_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/davinci_mmc.c +2 -2
index fe7712532e84..cde4c4339ab7 100644
@@ -21,9 +21,9 @@
 #include <linux/mmc/mmc.h>
 #include <linux/mmc/slot-gpio.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/platform_data/mmc-davinci.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 
 /*
  * Register Definitions
@@ -1228,7 +1228,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
 
 	host->mmc_input_clk = clk_get_rate(host->clk);
 
-	pdev->id_entry = of_device_get_match_data(&pdev->dev);
+	pdev->id_entry = device_get_match_data(&pdev->dev);
 	if (pdev->id_entry) {
 		ret = mmc_of_parse(mmc);
 		if (ret) {
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 2/2] mmc: davinci: use generic device_get_match_data()

Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use the OF-specific variant so switch to using the generic device_get_match_data() helper instead.

Applied for next, thanks!

Kind regards
Uffe

Quoted 31 lines
---
 drivers/mmc/host/davinci_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/davinci_mmc.c +2 -3
index fe7712532e84..cde4c4339ab7 100644
@@ -21,9 +21,9 @@
 #include <linux/mmc/mmc.h>
 #include <linux/mmc/slot-gpio.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/platform_data/mmc-davinci.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 
 /*
  * Register Definitions
@@ -1228,7 +1228,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
 
        host->mmc_input_clk = clk_get_rate(host->clk);
 
-       pdev->id_entry = of_device_get_match_data(&pdev->dev);
+       pdev->id_entry = device_get_match_data(&pdev->dev);
        if (pdev->id_entry) {
                ret = mmc_of_parse(mmc);
                if (ret) {
--

2.43.0

#3 lore raw
In reply to Bartosz Golaszewski
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

For better readability, put all header inclusions in alphabetical order.

Applied for next, thanks!

Kind regards
Uffe

Quoted 47 lines
---
 drivers/mmc/host/davinci_mmc.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
drivers/mmc/host/davinci_mmc.c +11 -13
index 7ed533758dbe..fe7712532e84 100644
@@ -7,24 +7,23 @@
  * Copyright (C) 2009 David Brownell
  */
 
-#include <linux/module.h>
-#include <linux/ioport.h>
-#include <linux/platform_device.h>
 #include <linux/clk.h>
-#include <linux/err.h>
 #include <linux/cpufreq.h>
-#include <linux/mmc/host.h>
-#include <linux/io.h>
-#include <linux/irq.h>
 #include <linux/delay.h>
-#include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
-#include <linux/mmc/mmc.h>
-#include <linux/of.h>
-#include <linux/mmc/slot-gpio.h>
+#include <linux/dmaengine.h>
+#include <linux/err.h>
 #include <linux/interrupt.h>
-
+#include <linux/io.h>
+#include <linux/ioport.h>
+#include <linux/irq.h>
+#include <linux/mmc/host.h>
+#include <linux/mmc/mmc.h>
+#include <linux/mmc/slot-gpio.h>
+#include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_device.h>
 
 /*
  * Register Definitions
--

2.43.0