diff mbox

[5/5] net: davinci_mdio: trivial cleanup

Message ID 1368689438-23889-6-git-send-email-prabhakar.csengg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Prabhakar May 16, 2013, 7:30 a.m. UTC
From: Lad, Prabhakar <prabhakar.csengg@gmail.com>

remove unwanted header inclusion and sort the alphabetically
also guard the davinci_mdio_of_mtable table and davinci_mdio_probe_dt()
with CONFIG_OF.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 drivers/net/ethernet/ti/davinci_mdio.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

Comments

Sergei Shtylyov May 16, 2013, 6:58 p.m. UTC | #1
On 16-05-2013 11:30, Lad Prabhakar wrote:

> From: Lad, Prabhakar <prabhakar.csengg@gmail.com>

> remove unwanted header inclusion and sort the alphabetically

    s/the/them/.

> also guard the davinci_mdio_of_mtable table and davinci_mdio_probe_dt()
> with CONFIG_OF.

    Saying "also" in the changelog is often a good sign there should be 
one more patch -- as in this case.

> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

WBR, Sergei
Prabhakar May 17, 2013, 4:46 a.m. UTC | #2
Hi Sergei,

Thanks for the review.

On Fri, May 17, 2013 at 12:28 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 16-05-2013 11:30, Lad Prabhakar wrote:
>
>> From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>
>
>> remove unwanted header inclusion and sort the alphabetically
>
>
>    s/the/them/.
OK
>
>
>> also guard the davinci_mdio_of_mtable table and davinci_mdio_probe_dt()
>> with CONFIG_OF.
>
>
>    Saying "also" in the changelog is often a good sign there should be one
> more patch -- as in this case.
>
OK I'll split the patch.

Regards,
--Prabhakar Lad
diff mbox

Patch

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 12aec17..bc6cfec 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -24,20 +24,16 @@ 
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  * ---------------------------------------------------------------------------
  */
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/phy.h>
+
 #include <linux/clk.h>
-#include <linux/err.h>
-#include <linux/io.h>
-#include <linux/pm_runtime.h>
 #include <linux/davinci_emac.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
 
 /*
  * This timeout definition is a worst-case ultra defensive measure against
@@ -291,6 +287,7 @@  static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_OF)
 static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
 			 struct platform_device *pdev)
 {
@@ -308,7 +305,7 @@  static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
 
 	return 0;
 }
-
+#endif
 
 static int davinci_mdio_probe(struct platform_device *pdev)
 {
@@ -481,11 +478,13 @@  static const struct dev_pm_ops davinci_mdio_pm_ops = {
 	.resume		= davinci_mdio_resume,
 };
 
+#if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id davinci_mdio_of_mtable[] = {
 	{ .compatible = "ti,davinci_mdio", },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
+#endif
 
 static struct platform_driver davinci_mdio_driver = {
 	.driver = {