diff options
author | Scott Wood <scottwood@freescale.com> | 2007-10-01 15:20:17 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:54:00 -0400 |
commit | 0fb300fa9d54118c6dce772a29362d896775eff2 (patch) | |
tree | 39871f8e06d1733d55ce4e04e255783f4520f02b /drivers/net/fs_enet | |
parent | 3de96471bd7fb76406e975ef6387abe3a0698149 (diff) |
fs_enet: Whitespace cleanup.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r-- | drivers/net/fs_enet/fs_enet-main.c | 85 | ||||
-rw-r--r-- | drivers/net/fs_enet/fs_enet.h | 4 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fcc.c | 1 | ||||
-rw-r--r-- | drivers/net/fs_enet/mii-bitbang.c | 3 | ||||
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 1 |
5 files changed, 41 insertions, 53 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index dcbe83c773ee..a15345ba1e59 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -343,7 +343,6 @@ static void fs_enet_tx(struct net_device *dev) | |||
343 | 343 | ||
344 | do_wake = do_restart = 0; | 344 | do_wake = do_restart = 0; |
345 | while (((sc = CBDR_SC(bdp)) & BD_ENET_TX_READY) == 0) { | 345 | while (((sc = CBDR_SC(bdp)) & BD_ENET_TX_READY) == 0) { |
346 | |||
347 | dirtyidx = bdp - fep->tx_bd_base; | 346 | dirtyidx = bdp - fep->tx_bd_base; |
348 | 347 | ||
349 | if (fep->tx_free == fep->tx_ring) | 348 | if (fep->tx_free == fep->tx_ring) |
@@ -444,7 +443,6 @@ fs_enet_interrupt(int irq, void *dev_id) | |||
444 | 443 | ||
445 | nr = 0; | 444 | nr = 0; |
446 | while ((int_events = (*fep->ops->get_int_events)(dev)) != 0) { | 445 | while ((int_events = (*fep->ops->get_int_events)(dev)) != 0) { |
447 | |||
448 | nr++; | 446 | nr++; |
449 | 447 | ||
450 | int_clr_events = int_events; | 448 | int_clr_events = int_events; |
@@ -700,45 +698,43 @@ static void fs_timeout(struct net_device *dev) | |||
700 | *-----------------------------------------------------------------------------*/ | 698 | *-----------------------------------------------------------------------------*/ |
701 | static void generic_adjust_link(struct net_device *dev) | 699 | static void generic_adjust_link(struct net_device *dev) |
702 | { | 700 | { |
703 | struct fs_enet_private *fep = netdev_priv(dev); | 701 | struct fs_enet_private *fep = netdev_priv(dev); |
704 | struct phy_device *phydev = fep->phydev; | 702 | struct phy_device *phydev = fep->phydev; |
705 | int new_state = 0; | 703 | int new_state = 0; |
706 | 704 | ||
707 | if (phydev->link) { | 705 | if (phydev->link) { |
708 | 706 | /* adjust to duplex mode */ | |
709 | /* adjust to duplex mode */ | 707 | if (phydev->duplex != fep->oldduplex) { |
710 | if (phydev->duplex != fep->oldduplex){ | 708 | new_state = 1; |
711 | new_state = 1; | 709 | fep->oldduplex = phydev->duplex; |
712 | fep->oldduplex = phydev->duplex; | 710 | } |
713 | } | 711 | |
714 | 712 | if (phydev->speed != fep->oldspeed) { | |
715 | if (phydev->speed != fep->oldspeed) { | 713 | new_state = 1; |
716 | new_state = 1; | 714 | fep->oldspeed = phydev->speed; |
717 | fep->oldspeed = phydev->speed; | 715 | } |
718 | } | 716 | |
719 | 717 | if (!fep->oldlink) { | |
720 | if (!fep->oldlink) { | 718 | new_state = 1; |
721 | new_state = 1; | 719 | fep->oldlink = 1; |
722 | fep->oldlink = 1; | 720 | netif_schedule(dev); |
723 | netif_schedule(dev); | 721 | netif_carrier_on(dev); |
724 | netif_carrier_on(dev); | 722 | netif_start_queue(dev); |
725 | netif_start_queue(dev); | 723 | } |
726 | } | 724 | |
727 | 725 | if (new_state) | |
728 | if (new_state) | 726 | fep->ops->restart(dev); |
729 | fep->ops->restart(dev); | 727 | } else if (fep->oldlink) { |
730 | 728 | new_state = 1; | |
731 | } else if (fep->oldlink) { | 729 | fep->oldlink = 0; |
732 | new_state = 1; | 730 | fep->oldspeed = 0; |
733 | fep->oldlink = 0; | 731 | fep->oldduplex = -1; |
734 | fep->oldspeed = 0; | 732 | netif_carrier_off(dev); |
735 | fep->oldduplex = -1; | 733 | netif_stop_queue(dev); |
736 | netif_carrier_off(dev); | 734 | } |
737 | netif_stop_queue(dev); | 735 | |
738 | } | 736 | if (new_state && netif_msg_link(fep)) |
739 | 737 | phy_print_status(phydev); | |
740 | if (new_state && netif_msg_link(fep)) | ||
741 | phy_print_status(phydev); | ||
742 | } | 738 | } |
743 | 739 | ||
744 | 740 | ||
@@ -782,7 +778,6 @@ static int fs_init_phy(struct net_device *dev) | |||
782 | return 0; | 778 | return 0; |
783 | } | 779 | } |
784 | 780 | ||
785 | |||
786 | static int fs_enet_open(struct net_device *dev) | 781 | static int fs_enet_open(struct net_device *dev) |
787 | { | 782 | { |
788 | struct fs_enet_private *fep = netdev_priv(dev); | 783 | struct fs_enet_private *fep = netdev_priv(dev); |
@@ -971,7 +966,7 @@ static struct net_device *fs_init_instance(struct device *dev, | |||
971 | #endif | 966 | #endif |
972 | 967 | ||
973 | #ifdef CONFIG_FS_ENET_HAS_SCC | 968 | #ifdef CONFIG_FS_ENET_HAS_SCC |
974 | if (fs_get_scc_index(fpi->fs_no) >=0 ) | 969 | if (fs_get_scc_index(fpi->fs_no) >=0) |
975 | fep->ops = &fs_scc_ops; | 970 | fep->ops = &fs_scc_ops; |
976 | #endif | 971 | #endif |
977 | 972 | ||
@@ -1066,9 +1061,8 @@ static struct net_device *fs_init_instance(struct device *dev, | |||
1066 | 1061 | ||
1067 | return ndev; | 1062 | return ndev; |
1068 | 1063 | ||
1069 | err: | 1064 | err: |
1070 | if (ndev != NULL) { | 1065 | if (ndev != NULL) { |
1071 | |||
1072 | if (registered) | 1066 | if (registered) |
1073 | unregister_netdev(ndev); | 1067 | unregister_netdev(ndev); |
1074 | 1068 | ||
@@ -1259,7 +1253,6 @@ static int __init fs_init(void) | |||
1259 | err: | 1253 | err: |
1260 | cleanup_immap(); | 1254 | cleanup_immap(); |
1261 | return r; | 1255 | return r; |
1262 | |||
1263 | } | 1256 | } |
1264 | 1257 | ||
1265 | static void __exit fs_cleanup(void) | 1258 | static void __exit fs_cleanup(void) |
diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h index 46d0606b1439..fbe2087d0d79 100644 --- a/drivers/net/fs_enet/fs_enet.h +++ b/drivers/net/fs_enet/fs_enet.h | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <asm/commproc.h> | 15 | #include <asm/commproc.h> |
16 | 16 | ||
17 | struct fec_info { | 17 | struct fec_info { |
18 | fec_t* fecp; | 18 | fec_t *fecp; |
19 | u32 mii_speed; | 19 | u32 mii_speed; |
20 | }; | 20 | }; |
21 | #endif | 21 | #endif |
22 | 22 | ||
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 64071514d7d5..1e1024a4d432 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -86,7 +86,6 @@ | |||
86 | static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 mcn, u32 op) | 86 | static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 mcn, u32 op) |
87 | { | 87 | { |
88 | const struct fs_platform_info *fpi = fep->fpi; | 88 | const struct fs_platform_info *fpi = fep->fpi; |
89 | |||
90 | cpm2_map_t *immap = fs_enet_immap; | 89 | cpm2_map_t *immap = fs_enet_immap; |
91 | cpm_cpm2_t *cpmp = &immap->im_cpm; | 90 | cpm_cpm2_t *cpmp = &immap->im_cpm; |
92 | u32 v; | 91 | u32 v; |
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 1a41ea60f982..422f82877873 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * kind, whether express or implied. | 12 | * kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | |||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
@@ -308,7 +307,6 @@ static int fs_mii_bitbang_init(struct bb_info *bitbang, struct fs_mii_bb_platfor | |||
308 | return 0; | 307 | return 0; |
309 | } | 308 | } |
310 | 309 | ||
311 | |||
312 | static int __devinit fs_enet_mdio_probe(struct device *dev) | 310 | static int __devinit fs_enet_mdio_probe(struct device *dev) |
313 | { | 311 | { |
314 | struct platform_device *pdev = to_platform_device(dev); | 312 | struct platform_device *pdev = to_platform_device(dev); |
@@ -371,7 +369,6 @@ bus_register_fail: | |||
371 | return err; | 369 | return err; |
372 | } | 370 | } |
373 | 371 | ||
374 | |||
375 | static int fs_enet_mdio_remove(struct device *dev) | 372 | static int fs_enet_mdio_remove(struct device *dev) |
376 | { | 373 | { |
377 | struct mii_bus *bus = dev_get_drvdata(dev); | 374 | struct mii_bus *bus = dev_get_drvdata(dev); |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 0a563a83016f..53db696b948f 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -113,7 +113,6 @@ static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location) | |||
113 | } | 113 | } |
114 | 114 | ||
115 | return ret; | 115 | return ret; |
116 | |||
117 | } | 116 | } |
118 | 117 | ||
119 | static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val) | 118 | static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val) |