aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c35
-rw-r--r--drivers/net/dm9000.c2
-rw-r--r--drivers/net/fec_mpc52xx.c6
-rw-r--r--drivers/net/irda/vlsi_ir.c7
-rw-r--r--drivers/net/meth.c2
-rw-r--r--drivers/net/mlx4/en_netdev.c2
-rw-r--r--drivers/net/mlx4/en_rx.c2
-rw-r--r--drivers/net/mlx4/sense.c2
-rw-r--r--drivers/net/phy/phy.c3
-rw-r--r--drivers/net/smc91x.h32
-rw-r--r--drivers/net/wireless/airo.c1
11 files changed, 11 insertions, 83 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9c326a50a3ee..99610f358c40 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3444,25 +3444,12 @@ static void bond_remove_proc_entry(struct bonding *bond)
3444 */ 3444 */
3445static void bond_create_proc_dir(void) 3445static void bond_create_proc_dir(void)
3446{ 3446{
3447 int len = strlen(DRV_NAME);
3448
3449 for (bond_proc_dir = init_net.proc_net->subdir; bond_proc_dir;
3450 bond_proc_dir = bond_proc_dir->next) {
3451 if ((bond_proc_dir->namelen == len) &&
3452 !memcmp(bond_proc_dir->name, DRV_NAME, len)) {
3453 break;
3454 }
3455 }
3456
3457 if (!bond_proc_dir) { 3447 if (!bond_proc_dir) {
3458 bond_proc_dir = proc_mkdir(DRV_NAME, init_net.proc_net); 3448 bond_proc_dir = proc_mkdir(DRV_NAME, init_net.proc_net);
3459 if (bond_proc_dir) { 3449 if (!bond_proc_dir)
3460 bond_proc_dir->owner = THIS_MODULE;
3461 } else {
3462 printk(KERN_WARNING DRV_NAME 3450 printk(KERN_WARNING DRV_NAME
3463 ": Warning: cannot create /proc/net/%s\n", 3451 ": Warning: cannot create /proc/net/%s\n",
3464 DRV_NAME); 3452 DRV_NAME);
3465 }
3466 } 3453 }
3467} 3454}
3468 3455
@@ -3471,25 +3458,7 @@ static void bond_create_proc_dir(void)
3471 */ 3458 */
3472static void bond_destroy_proc_dir(void) 3459static void bond_destroy_proc_dir(void)
3473{ 3460{
3474 struct proc_dir_entry *de; 3461 if (bond_proc_dir) {
3475
3476 if (!bond_proc_dir) {
3477 return;
3478 }
3479
3480 /* verify that the /proc dir is empty */
3481 for (de = bond_proc_dir->subdir; de; de = de->next) {
3482 /* ignore . and .. */
3483 if (*(de->name) != '.') {
3484 break;
3485 }
3486 }
3487
3488 if (de) {
3489 if (bond_proc_dir->owner == THIS_MODULE) {
3490 bond_proc_dir->owner = NULL;
3491 }
3492 } else {
3493 remove_proc_entry(DRV_NAME, init_net.proc_net); 3462 remove_proc_entry(DRV_NAME, init_net.proc_net);
3494 bond_proc_dir = NULL; 3463 bond_proc_dir = NULL;
3495 } 3464 }
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 254ec62b5f58..d8350860c0f8 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -559,7 +559,7 @@ static void dm9000_show_carrier(board_info_t *db,
559static void 559static void
560dm9000_poll_work(struct work_struct *w) 560dm9000_poll_work(struct work_struct *w)
561{ 561{
562 struct delayed_work *dw = container_of(w, struct delayed_work, work); 562 struct delayed_work *dw = to_delayed_work(w);
563 board_info_t *db = container_of(dw, board_info_t, phy_poll); 563 board_info_t *db = container_of(dw, board_info_t, phy_poll);
564 struct net_device *ndev = db->ndev; 564 struct net_device *ndev = db->ndev;
565 565
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 2d0a198882ab..8bbe7f617994 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -1134,9 +1134,9 @@ static int mpc52xx_fec_of_resume(struct of_device *op)
1134#endif 1134#endif
1135 1135
1136static struct of_device_id mpc52xx_fec_match[] = { 1136static struct of_device_id mpc52xx_fec_match[] = {
1137 { .type = "network", .compatible = "fsl,mpc5200b-fec", }, 1137 { .compatible = "fsl,mpc5200b-fec", },
1138 { .type = "network", .compatible = "fsl,mpc5200-fec", }, 1138 { .compatible = "fsl,mpc5200-fec", },
1139 { .type = "network", .compatible = "mpc5200-fec", }, 1139 { .compatible = "mpc5200-fec", },
1140 { } 1140 { }
1141}; 1141};
1142 1142
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index 1243bc8e0035..ac0e4b6b6b66 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -1871,13 +1871,6 @@ static int __init vlsi_mod_init(void)
1871 * without procfs - it's not required for the driver to work. 1871 * without procfs - it's not required for the driver to work.
1872 */ 1872 */
1873 vlsi_proc_root = proc_mkdir(PROC_DIR, NULL); 1873 vlsi_proc_root = proc_mkdir(PROC_DIR, NULL);
1874 if (vlsi_proc_root) {
1875 /* protect registered procdir against module removal.
1876 * Because we are in the module init path there's no race
1877 * window after create_proc_entry (and no barrier needed).
1878 */
1879 vlsi_proc_root->owner = THIS_MODULE;
1880 }
1881 1874
1882 ret = pci_register_driver(&vlsi_irda_driver); 1875 ret = pci_register_driver(&vlsi_irda_driver);
1883 1876
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index c336a1f42510..aa08987f6e81 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -398,7 +398,7 @@ static void meth_rx(struct net_device* dev, unsigned long int_status)
398 int len = (status & 0xffff) - 4; /* omit CRC */ 398 int len = (status & 0xffff) - 4; /* omit CRC */
399 /* length sanity check */ 399 /* length sanity check */
400 if (len < 60 || len > 1518) { 400 if (len < 60 || len > 1518) {
401 printk(KERN_DEBUG "%s: bogus packet size: %ld, status=%#2lx.\n", 401 printk(KERN_DEBUG "%s: bogus packet size: %ld, status=%#2Lx.\n",
402 dev->name, priv->rx_write, 402 dev->name, priv->rx_write,
403 priv->rx_ring[priv->rx_write]->status.raw); 403 priv->rx_ring[priv->rx_write]->status.raw);
404 dev->stats.rx_errors++; 404 dev->stats.rx_errors++;
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 9f6644a44030..303c23de6cac 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -505,7 +505,7 @@ out:
505 505
506static void mlx4_en_do_get_stats(struct work_struct *work) 506static void mlx4_en_do_get_stats(struct work_struct *work)
507{ 507{
508 struct delayed_work *delay = container_of(work, struct delayed_work, work); 508 struct delayed_work *delay = to_delayed_work(work);
509 struct mlx4_en_priv *priv = container_of(delay, struct mlx4_en_priv, 509 struct mlx4_en_priv *priv = container_of(delay, struct mlx4_en_priv,
510 stats_task); 510 stats_task);
511 struct mlx4_en_dev *mdev = priv->mdev; 511 struct mlx4_en_dev *mdev = priv->mdev;
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index a4130e764991..7e40741fb7d8 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -298,7 +298,7 @@ static void mlx4_en_free_rx_buf(struct mlx4_en_priv *priv,
298 298
299void mlx4_en_rx_refill(struct work_struct *work) 299void mlx4_en_rx_refill(struct work_struct *work)
300{ 300{
301 struct delayed_work *delay = container_of(work, struct delayed_work, work); 301 struct delayed_work *delay = to_delayed_work(work);
302 struct mlx4_en_priv *priv = container_of(delay, struct mlx4_en_priv, 302 struct mlx4_en_priv *priv = container_of(delay, struct mlx4_en_priv,
303 refill_task); 303 refill_task);
304 struct mlx4_en_dev *mdev = priv->mdev; 304 struct mlx4_en_dev *mdev = priv->mdev;
diff --git a/drivers/net/mlx4/sense.c b/drivers/net/mlx4/sense.c
index 6d5089ecb5af..f36ae691cab3 100644
--- a/drivers/net/mlx4/sense.c
+++ b/drivers/net/mlx4/sense.c
@@ -103,7 +103,7 @@ void mlx4_do_sense_ports(struct mlx4_dev *dev,
103 103
104static void mlx4_sense_port(struct work_struct *work) 104static void mlx4_sense_port(struct work_struct *work)
105{ 105{
106 struct delayed_work *delay = container_of(work, struct delayed_work, work); 106 struct delayed_work *delay = to_delayed_work(work);
107 struct mlx4_sense *sense = container_of(delay, struct mlx4_sense, 107 struct mlx4_sense *sense = container_of(delay, struct mlx4_sense,
108 sense_poll); 108 sense_poll);
109 struct mlx4_dev *dev = sense->dev; 109 struct mlx4_dev *dev = sense->dev;
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 58b73b08dde0..3ff1f425f1bb 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -757,8 +757,7 @@ EXPORT_SYMBOL(phy_start);
757 */ 757 */
758static void phy_state_machine(struct work_struct *work) 758static void phy_state_machine(struct work_struct *work)
759{ 759{
760 struct delayed_work *dwork = 760 struct delayed_work *dwork = to_delayed_work(work);
761 container_of(work, struct delayed_work, work);
762 struct phy_device *phydev = 761 struct phy_device *phydev =
763 container_of(dwork, struct phy_device, state_queue); 762 container_of(dwork, struct phy_device, state_queue);
764 int needs_aneg = 0; 763 int needs_aneg = 0;
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 6c44f86ae3fd..912308eec865 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -346,38 +346,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
346#define RPC_LSA_DEFAULT RPC_LED_TX_RX 346#define RPC_LSA_DEFAULT RPC_LED_TX_RX
347#define RPC_LSB_DEFAULT RPC_LED_100_10 347#define RPC_LSB_DEFAULT RPC_LED_100_10
348 348
349#elif defined(CONFIG_SOC_AU1X00)
350
351#include <au1xxx.h>
352
353/* We can only do 16-bit reads and writes in the static memory space. */
354#define SMC_CAN_USE_8BIT 0
355#define SMC_CAN_USE_16BIT 1
356#define SMC_CAN_USE_32BIT 0
357#define SMC_IO_SHIFT 0
358#define SMC_NOWAIT 1
359
360#define SMC_inw(a, r) au_readw((unsigned long)((a) + (r)))
361#define SMC_insw(a, r, p, l) \
362 do { \
363 unsigned long _a = (unsigned long)((a) + (r)); \
364 int _l = (l); \
365 u16 *_p = (u16 *)(p); \
366 while (_l-- > 0) \
367 *_p++ = au_readw(_a); \
368 } while(0)
369#define SMC_outw(v, a, r) au_writew(v, (unsigned long)((a) + (r)))
370#define SMC_outsw(a, r, p, l) \
371 do { \
372 unsigned long _a = (unsigned long)((a) + (r)); \
373 int _l = (l); \
374 const u16 *_p = (const u16 *)(p); \
375 while (_l-- > 0) \
376 au_writew(*_p++ , _a); \
377 } while(0)
378
379#define SMC_IRQ_FLAGS (0)
380
381#elif defined(CONFIG_ARCH_VERSATILE) 349#elif defined(CONFIG_ARCH_VERSATILE)
382 350
383#define SMC_CAN_USE_8BIT 1 351#define SMC_CAN_USE_8BIT 1
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 93302c0a36b0..f21a6171c691 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4492,7 +4492,6 @@ static int setup_proc_entry( struct net_device *dev,
4492 goto fail; 4492 goto fail;
4493 apriv->proc_entry->uid = proc_uid; 4493 apriv->proc_entry->uid = proc_uid;
4494 apriv->proc_entry->gid = proc_gid; 4494 apriv->proc_entry->gid = proc_gid;
4495 apriv->proc_entry->owner = THIS_MODULE;
4496 4495
4497 /* Setup the StatsDelta */ 4496 /* Setup the StatsDelta */
4498 entry = proc_create_data("StatsDelta", 4497 entry = proc_create_data("StatsDelta",