aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-07 15:18:14 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-08 13:38:13 -0400
commit2b162928afeac2448c790bdf46f9f7f88ac8f3f4 (patch)
tree2f046bf7ba2476a39eb1a492348b9af0edea979f
parent945a36761fd7877660f630bbdeb4ff9ff80d1935 (diff)
dm9000: Remove typedef board_info_t
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for board_info_t. Also, the name of the structs is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the cases: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/davicom/dm9000.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 23084fb2090e..9b33057a9477 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -93,7 +93,7 @@ enum dm9000_type {
93}; 93};
94 94
95/* Structure/enum declaration ------------------------------- */ 95/* Structure/enum declaration ------------------------------- */
96typedef struct board_info { 96struct board_info {
97 97
98 void __iomem *io_addr; /* Register I/O base address */ 98 void __iomem *io_addr; /* Register I/O base address */
99 void __iomem *io_data; /* Data I/O address */ 99 void __iomem *io_data; /* Data I/O address */
@@ -141,7 +141,7 @@ typedef struct board_info {
141 u32 wake_state; 141 u32 wake_state;
142 142
143 int ip_summed; 143 int ip_summed;
144} board_info_t; 144};
145 145
146/* debug code */ 146/* debug code */
147 147
@@ -151,7 +151,7 @@ typedef struct board_info {
151 } \ 151 } \
152} while (0) 152} while (0)
153 153
154static inline board_info_t *to_dm9000_board(struct net_device *dev) 154static inline struct board_info *to_dm9000_board(struct net_device *dev)
155{ 155{
156 return netdev_priv(dev); 156 return netdev_priv(dev);
157} 157}
@@ -162,7 +162,7 @@ static inline board_info_t *to_dm9000_board(struct net_device *dev)
162 * Read a byte from I/O port 162 * Read a byte from I/O port
163 */ 163 */
164static u8 164static u8
165ior(board_info_t *db, int reg) 165ior(struct board_info *db, int reg)
166{ 166{
167 writeb(reg, db->io_addr); 167 writeb(reg, db->io_addr);
168 return readb(db->io_data); 168 return readb(db->io_data);
@@ -173,14 +173,14 @@ ior(board_info_t *db, int reg)
173 */ 173 */
174 174
175static void 175static void
176iow(board_info_t *db, int reg, int value) 176iow(struct board_info *db, int reg, int value)
177{ 177{
178 writeb(reg, db->io_addr); 178 writeb(reg, db->io_addr);
179 writeb(value, db->io_data); 179 writeb(value, db->io_data);
180} 180}
181 181
182static void 182static void
183dm9000_reset(board_info_t *db) 183dm9000_reset(struct board_info *db)
184{ 184{
185 dev_dbg(db->dev, "resetting device\n"); 185 dev_dbg(db->dev, "resetting device\n");
186 186
@@ -272,7 +272,7 @@ static void dm9000_dumpblk_32bit(void __iomem *reg, int count)
272 * Sleep, either by using msleep() or if we are suspending, then 272 * Sleep, either by using msleep() or if we are suspending, then
273 * use mdelay() to sleep. 273 * use mdelay() to sleep.
274 */ 274 */
275static void dm9000_msleep(board_info_t *db, unsigned int ms) 275static void dm9000_msleep(struct board_info *db, unsigned int ms)
276{ 276{
277 if (db->in_suspend || db->in_timeout) 277 if (db->in_suspend || db->in_timeout)
278 mdelay(ms); 278 mdelay(ms);
@@ -284,7 +284,7 @@ static void dm9000_msleep(board_info_t *db, unsigned int ms)
284static int 284static int
285dm9000_phy_read(struct net_device *dev, int phy_reg_unused, int reg) 285dm9000_phy_read(struct net_device *dev, int phy_reg_unused, int reg)
286{ 286{
287 board_info_t *db = netdev_priv(dev); 287 struct board_info *db = netdev_priv(dev);
288 unsigned long flags; 288 unsigned long flags;
289 unsigned int reg_save; 289 unsigned int reg_save;
290 int ret; 290 int ret;
@@ -330,7 +330,7 @@ static void
330dm9000_phy_write(struct net_device *dev, 330dm9000_phy_write(struct net_device *dev,
331 int phyaddr_unused, int reg, int value) 331 int phyaddr_unused, int reg, int value)
332{ 332{
333 board_info_t *db = netdev_priv(dev); 333 struct board_info *db = netdev_priv(dev);
334 unsigned long flags; 334 unsigned long flags;
335 unsigned long reg_save; 335 unsigned long reg_save;
336 336
@@ -408,7 +408,7 @@ static void dm9000_set_io(struct board_info *db, int byte_width)
408 } 408 }
409} 409}
410 410
411static void dm9000_schedule_poll(board_info_t *db) 411static void dm9000_schedule_poll(struct board_info *db)
412{ 412{
413 if (db->type == TYPE_DM9000E) 413 if (db->type == TYPE_DM9000E)
414 schedule_delayed_work(&db->phy_poll, HZ * 2); 414 schedule_delayed_work(&db->phy_poll, HZ * 2);
@@ -416,7 +416,7 @@ static void dm9000_schedule_poll(board_info_t *db)
416 416
417static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd) 417static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
418{ 418{
419 board_info_t *dm = to_dm9000_board(dev); 419 struct board_info *dm = to_dm9000_board(dev);
420 420
421 if (!netif_running(dev)) 421 if (!netif_running(dev))
422 return -EINVAL; 422 return -EINVAL;
@@ -425,7 +425,7 @@ static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
425} 425}
426 426
427static unsigned int 427static unsigned int
428dm9000_read_locked(board_info_t *db, int reg) 428dm9000_read_locked(struct board_info *db, int reg)
429{ 429{
430 unsigned long flags; 430 unsigned long flags;
431 unsigned int ret; 431 unsigned int ret;
@@ -437,7 +437,7 @@ dm9000_read_locked(board_info_t *db, int reg)
437 return ret; 437 return ret;
438} 438}
439 439
440static int dm9000_wait_eeprom(board_info_t *db) 440static int dm9000_wait_eeprom(struct board_info *db)
441{ 441{
442 unsigned int status; 442 unsigned int status;
443 int timeout = 8; /* wait max 8msec */ 443 int timeout = 8; /* wait max 8msec */
@@ -474,7 +474,7 @@ static int dm9000_wait_eeprom(board_info_t *db)
474 * Read a word data from EEPROM 474 * Read a word data from EEPROM
475 */ 475 */
476static void 476static void
477dm9000_read_eeprom(board_info_t *db, int offset, u8 *to) 477dm9000_read_eeprom(struct board_info *db, int offset, u8 *to)
478{ 478{
479 unsigned long flags; 479 unsigned long flags;
480 480
@@ -514,7 +514,7 @@ dm9000_read_eeprom(board_info_t *db, int offset, u8 *to)
514 * Write a word data to SROM 514 * Write a word data to SROM
515 */ 515 */
516static void 516static void
517dm9000_write_eeprom(board_info_t *db, int offset, u8 *data) 517dm9000_write_eeprom(struct board_info *db, int offset, u8 *data)
518{ 518{
519 unsigned long flags; 519 unsigned long flags;
520 520
@@ -546,7 +546,7 @@ dm9000_write_eeprom(board_info_t *db, int offset, u8 *data)
546static void dm9000_get_drvinfo(struct net_device *dev, 546static void dm9000_get_drvinfo(struct net_device *dev,
547 struct ethtool_drvinfo *info) 547 struct ethtool_drvinfo *info)
548{ 548{
549 board_info_t *dm = to_dm9000_board(dev); 549 struct board_info *dm = to_dm9000_board(dev);
550 550
551 strlcpy(info->driver, CARDNAME, sizeof(info->driver)); 551 strlcpy(info->driver, CARDNAME, sizeof(info->driver));
552 strlcpy(info->version, DRV_VERSION, sizeof(info->version)); 552 strlcpy(info->version, DRV_VERSION, sizeof(info->version));
@@ -556,21 +556,21 @@ static void dm9000_get_drvinfo(struct net_device *dev,
556 556
557static u32 dm9000_get_msglevel(struct net_device *dev) 557static u32 dm9000_get_msglevel(struct net_device *dev)
558{ 558{
559 board_info_t *dm = to_dm9000_board(dev); 559 struct board_info *dm = to_dm9000_board(dev);
560 560
561 return dm->msg_enable; 561 return dm->msg_enable;
562} 562}
563 563
564static void dm9000_set_msglevel(struct net_device *dev, u32 value) 564static void dm9000_set_msglevel(struct net_device *dev, u32 value)
565{ 565{
566 board_info_t *dm = to_dm9000_board(dev); 566 struct board_info *dm = to_dm9000_board(dev);
567 567
568 dm->msg_enable = value; 568 dm->msg_enable = value;
569} 569}
570 570
571static int dm9000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) 571static int dm9000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
572{ 572{
573 board_info_t *dm = to_dm9000_board(dev); 573 struct board_info *dm = to_dm9000_board(dev);
574 574
575 mii_ethtool_gset(&dm->mii, cmd); 575 mii_ethtool_gset(&dm->mii, cmd);
576 return 0; 576 return 0;
@@ -578,21 +578,21 @@ static int dm9000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
578 578
579static int dm9000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) 579static int dm9000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
580{ 580{
581 board_info_t *dm = to_dm9000_board(dev); 581 struct board_info *dm = to_dm9000_board(dev);
582 582
583 return mii_ethtool_sset(&dm->mii, cmd); 583 return mii_ethtool_sset(&dm->mii, cmd);
584} 584}
585 585
586static int dm9000_nway_reset(struct net_device *dev) 586static int dm9000_nway_reset(struct net_device *dev)
587{ 587{
588 board_info_t *dm = to_dm9000_board(dev); 588 struct board_info *dm = to_dm9000_board(dev);
589 return mii_nway_restart(&dm->mii); 589 return mii_nway_restart(&dm->mii);
590} 590}
591 591
592static int dm9000_set_features(struct net_device *dev, 592static int dm9000_set_features(struct net_device *dev,
593 netdev_features_t features) 593 netdev_features_t features)
594{ 594{
595 board_info_t *dm = to_dm9000_board(dev); 595 struct board_info *dm = to_dm9000_board(dev);
596 netdev_features_t changed = dev->features ^ features; 596 netdev_features_t changed = dev->features ^ features;
597 unsigned long flags; 597 unsigned long flags;
598 598
@@ -608,7 +608,7 @@ static int dm9000_set_features(struct net_device *dev,
608 608
609static u32 dm9000_get_link(struct net_device *dev) 609static u32 dm9000_get_link(struct net_device *dev)
610{ 610{
611 board_info_t *dm = to_dm9000_board(dev); 611 struct board_info *dm = to_dm9000_board(dev);
612 u32 ret; 612 u32 ret;
613 613
614 if (dm->flags & DM9000_PLATF_EXT_PHY) 614 if (dm->flags & DM9000_PLATF_EXT_PHY)
@@ -629,7 +629,7 @@ static int dm9000_get_eeprom_len(struct net_device *dev)
629static int dm9000_get_eeprom(struct net_device *dev, 629static int dm9000_get_eeprom(struct net_device *dev,
630 struct ethtool_eeprom *ee, u8 *data) 630 struct ethtool_eeprom *ee, u8 *data)
631{ 631{
632 board_info_t *dm = to_dm9000_board(dev); 632 struct board_info *dm = to_dm9000_board(dev);
633 int offset = ee->offset; 633 int offset = ee->offset;
634 int len = ee->len; 634 int len = ee->len;
635 int i; 635 int i;
@@ -653,7 +653,7 @@ static int dm9000_get_eeprom(struct net_device *dev,
653static int dm9000_set_eeprom(struct net_device *dev, 653static int dm9000_set_eeprom(struct net_device *dev,
654 struct ethtool_eeprom *ee, u8 *data) 654 struct ethtool_eeprom *ee, u8 *data)
655{ 655{
656 board_info_t *dm = to_dm9000_board(dev); 656 struct board_info *dm = to_dm9000_board(dev);
657 int offset = ee->offset; 657 int offset = ee->offset;
658 int len = ee->len; 658 int len = ee->len;
659 int done; 659 int done;
@@ -691,7 +691,7 @@ static int dm9000_set_eeprom(struct net_device *dev,
691 691
692static void dm9000_get_wol(struct net_device *dev, struct ethtool_wolinfo *w) 692static void dm9000_get_wol(struct net_device *dev, struct ethtool_wolinfo *w)
693{ 693{
694 board_info_t *dm = to_dm9000_board(dev); 694 struct board_info *dm = to_dm9000_board(dev);
695 695
696 memset(w, 0, sizeof(struct ethtool_wolinfo)); 696 memset(w, 0, sizeof(struct ethtool_wolinfo));
697 697
@@ -702,7 +702,7 @@ static void dm9000_get_wol(struct net_device *dev, struct ethtool_wolinfo *w)
702 702
703static int dm9000_set_wol(struct net_device *dev, struct ethtool_wolinfo *w) 703static int dm9000_set_wol(struct net_device *dev, struct ethtool_wolinfo *w)
704{ 704{
705 board_info_t *dm = to_dm9000_board(dev); 705 struct board_info *dm = to_dm9000_board(dev);
706 unsigned long flags; 706 unsigned long flags;
707 u32 opts = w->wolopts; 707 u32 opts = w->wolopts;
708 u32 wcr = 0; 708 u32 wcr = 0;
@@ -752,7 +752,7 @@ static const struct ethtool_ops dm9000_ethtool_ops = {
752 .set_eeprom = dm9000_set_eeprom, 752 .set_eeprom = dm9000_set_eeprom,
753}; 753};
754 754
755static void dm9000_show_carrier(board_info_t *db, 755static void dm9000_show_carrier(struct board_info *db,
756 unsigned carrier, unsigned nsr) 756 unsigned carrier, unsigned nsr)
757{ 757{
758 int lpa; 758 int lpa;
@@ -775,7 +775,7 @@ static void
775dm9000_poll_work(struct work_struct *w) 775dm9000_poll_work(struct work_struct *w)
776{ 776{
777 struct delayed_work *dw = to_delayed_work(w); 777 struct delayed_work *dw = to_delayed_work(w);
778 board_info_t *db = container_of(dw, board_info_t, phy_poll); 778 struct board_info *db = container_of(dw, struct board_info, phy_poll);
779 struct net_device *ndev = db->ndev; 779 struct net_device *ndev = db->ndev;
780 780
781 if (db->flags & DM9000_PLATF_SIMPLE_PHY && 781 if (db->flags & DM9000_PLATF_SIMPLE_PHY &&
@@ -843,7 +843,7 @@ static unsigned char dm9000_type_to_char(enum dm9000_type type)
843static void 843static void
844dm9000_hash_table_unlocked(struct net_device *dev) 844dm9000_hash_table_unlocked(struct net_device *dev)
845{ 845{
846 board_info_t *db = netdev_priv(dev); 846 struct board_info *db = netdev_priv(dev);
847 struct netdev_hw_addr *ha; 847 struct netdev_hw_addr *ha;
848 int i, oft; 848 int i, oft;
849 u32 hash_val; 849 u32 hash_val;
@@ -879,7 +879,7 @@ dm9000_hash_table_unlocked(struct net_device *dev)
879static void 879static void
880dm9000_hash_table(struct net_device *dev) 880dm9000_hash_table(struct net_device *dev)
881{ 881{
882 board_info_t *db = netdev_priv(dev); 882 struct board_info *db = netdev_priv(dev);
883 unsigned long flags; 883 unsigned long flags;
884 884
885 spin_lock_irqsave(&db->lock, flags); 885 spin_lock_irqsave(&db->lock, flags);
@@ -888,13 +888,13 @@ dm9000_hash_table(struct net_device *dev)
888} 888}
889 889
890static void 890static void
891dm9000_mask_interrupts(board_info_t *db) 891dm9000_mask_interrupts(struct board_info *db)
892{ 892{
893 iow(db, DM9000_IMR, IMR_PAR); 893 iow(db, DM9000_IMR, IMR_PAR);
894} 894}
895 895
896static void 896static void
897dm9000_unmask_interrupts(board_info_t *db) 897dm9000_unmask_interrupts(struct board_info *db)
898{ 898{
899 iow(db, DM9000_IMR, db->imr_all); 899 iow(db, DM9000_IMR, db->imr_all);
900} 900}
@@ -905,7 +905,7 @@ dm9000_unmask_interrupts(board_info_t *db)
905static void 905static void
906dm9000_init_dm9000(struct net_device *dev) 906dm9000_init_dm9000(struct net_device *dev)
907{ 907{
908 board_info_t *db = netdev_priv(dev); 908 struct board_info *db = netdev_priv(dev);
909 unsigned int imr; 909 unsigned int imr;
910 unsigned int ncr; 910 unsigned int ncr;
911 911
@@ -970,7 +970,7 @@ dm9000_init_dm9000(struct net_device *dev)
970/* Our watchdog timed out. Called by the networking layer */ 970/* Our watchdog timed out. Called by the networking layer */
971static void dm9000_timeout(struct net_device *dev) 971static void dm9000_timeout(struct net_device *dev)
972{ 972{
973 board_info_t *db = netdev_priv(dev); 973 struct board_info *db = netdev_priv(dev);
974 u8 reg_save; 974 u8 reg_save;
975 unsigned long flags; 975 unsigned long flags;
976 976
@@ -996,7 +996,7 @@ static void dm9000_send_packet(struct net_device *dev,
996 int ip_summed, 996 int ip_summed,
997 u16 pkt_len) 997 u16 pkt_len)
998{ 998{
999 board_info_t *dm = to_dm9000_board(dev); 999 struct board_info *dm = to_dm9000_board(dev);
1000 1000
1001 /* The DM9000 is not smart enough to leave fragmented packets alone. */ 1001 /* The DM9000 is not smart enough to leave fragmented packets alone. */
1002 if (dm->ip_summed != ip_summed) { 1002 if (dm->ip_summed != ip_summed) {
@@ -1023,7 +1023,7 @@ static int
1023dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev) 1023dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
1024{ 1024{
1025 unsigned long flags; 1025 unsigned long flags;
1026 board_info_t *db = netdev_priv(dev); 1026 struct board_info *db = netdev_priv(dev);
1027 1027
1028 dm9000_dbg(db, 3, "%s:\n", __func__); 1028 dm9000_dbg(db, 3, "%s:\n", __func__);
1029 1029
@@ -1062,7 +1062,7 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
1062 * receive the packet to upper layer, free the transmitted packet 1062 * receive the packet to upper layer, free the transmitted packet
1063 */ 1063 */
1064 1064
1065static void dm9000_tx_done(struct net_device *dev, board_info_t *db) 1065static void dm9000_tx_done(struct net_device *dev, struct board_info *db)
1066{ 1066{
1067 int tx_status = ior(db, DM9000_NSR); /* Got TX status */ 1067 int tx_status = ior(db, DM9000_NSR); /* Got TX status */
1068 1068
@@ -1094,7 +1094,7 @@ struct dm9000_rxhdr {
1094static void 1094static void
1095dm9000_rx(struct net_device *dev) 1095dm9000_rx(struct net_device *dev)
1096{ 1096{
1097 board_info_t *db = netdev_priv(dev); 1097 struct board_info *db = netdev_priv(dev);
1098 struct dm9000_rxhdr rxhdr; 1098 struct dm9000_rxhdr rxhdr;
1099 struct sk_buff *skb; 1099 struct sk_buff *skb;
1100 u8 rxbyte, *rdptr; 1100 u8 rxbyte, *rdptr;
@@ -1196,7 +1196,7 @@ dm9000_rx(struct net_device *dev)
1196static irqreturn_t dm9000_interrupt(int irq, void *dev_id) 1196static irqreturn_t dm9000_interrupt(int irq, void *dev_id)
1197{ 1197{
1198 struct net_device *dev = dev_id; 1198 struct net_device *dev = dev_id;
1199 board_info_t *db = netdev_priv(dev); 1199 struct board_info *db = netdev_priv(dev);
1200 int int_status; 1200 int int_status;
1201 unsigned long flags; 1201 unsigned long flags;
1202 u8 reg_save; 1202 u8 reg_save;
@@ -1246,7 +1246,7 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id)
1246static irqreturn_t dm9000_wol_interrupt(int irq, void *dev_id) 1246static irqreturn_t dm9000_wol_interrupt(int irq, void *dev_id)
1247{ 1247{
1248 struct net_device *dev = dev_id; 1248 struct net_device *dev = dev_id;
1249 board_info_t *db = netdev_priv(dev); 1249 struct board_info *db = netdev_priv(dev);
1250 unsigned long flags; 1250 unsigned long flags;
1251 unsigned nsr, wcr; 1251 unsigned nsr, wcr;
1252 1252
@@ -1296,7 +1296,7 @@ static void dm9000_poll_controller(struct net_device *dev)
1296static int 1296static int
1297dm9000_open(struct net_device *dev) 1297dm9000_open(struct net_device *dev)
1298{ 1298{
1299 board_info_t *db = netdev_priv(dev); 1299 struct board_info *db = netdev_priv(dev);
1300 unsigned long irqflags = db->irq_res->flags & IRQF_TRIGGER_MASK; 1300 unsigned long irqflags = db->irq_res->flags & IRQF_TRIGGER_MASK;
1301 1301
1302 if (netif_msg_ifup(db)) 1302 if (netif_msg_ifup(db))
@@ -1342,7 +1342,7 @@ dm9000_open(struct net_device *dev)
1342static void 1342static void
1343dm9000_shutdown(struct net_device *dev) 1343dm9000_shutdown(struct net_device *dev)
1344{ 1344{
1345 board_info_t *db = netdev_priv(dev); 1345 struct board_info *db = netdev_priv(dev);
1346 1346
1347 /* RESET device */ 1347 /* RESET device */
1348 dm9000_phy_write(dev, 0, MII_BMCR, BMCR_RESET); /* PHY RESET */ 1348 dm9000_phy_write(dev, 0, MII_BMCR, BMCR_RESET); /* PHY RESET */
@@ -1358,7 +1358,7 @@ dm9000_shutdown(struct net_device *dev)
1358static int 1358static int
1359dm9000_stop(struct net_device *ndev) 1359dm9000_stop(struct net_device *ndev)
1360{ 1360{
1361 board_info_t *db = netdev_priv(ndev); 1361 struct board_info *db = netdev_priv(ndev);
1362 1362
1363 if (netif_msg_ifdown(db)) 1363 if (netif_msg_ifdown(db))
1364 dev_dbg(db->dev, "shutting down %s\n", ndev->name); 1364 dev_dbg(db->dev, "shutting down %s\n", ndev->name);
@@ -1681,7 +1681,7 @@ dm9000_drv_suspend(struct device *dev)
1681{ 1681{
1682 struct platform_device *pdev = to_platform_device(dev); 1682 struct platform_device *pdev = to_platform_device(dev);
1683 struct net_device *ndev = platform_get_drvdata(pdev); 1683 struct net_device *ndev = platform_get_drvdata(pdev);
1684 board_info_t *db; 1684 struct board_info *db;
1685 1685
1686 if (ndev) { 1686 if (ndev) {
1687 db = netdev_priv(ndev); 1687 db = netdev_priv(ndev);
@@ -1704,7 +1704,7 @@ dm9000_drv_resume(struct device *dev)
1704{ 1704{
1705 struct platform_device *pdev = to_platform_device(dev); 1705 struct platform_device *pdev = to_platform_device(dev);
1706 struct net_device *ndev = platform_get_drvdata(pdev); 1706 struct net_device *ndev = platform_get_drvdata(pdev);
1707 board_info_t *db = netdev_priv(ndev); 1707 struct board_info *db = netdev_priv(ndev);
1708 1708
1709 if (ndev) { 1709 if (ndev) {
1710 if (netif_running(ndev)) { 1710 if (netif_running(ndev)) {