Eleminate the last remaining instance of a direct reference to the priv
member of struct net_device.  This was debug code only, so use BUG_ON()
instead of printk.

 baycom_par.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Index: bk-afu/drivers/net/hamradio/baycom_par.c
===================================================================
--- bk-afu.orig/drivers/net/hamradio/baycom_par.c
+++ bk-afu/drivers/net/hamradio/baycom_par.c
@@ -85,6 +85,7 @@
 #include <linux/parport.h>
 #include <linux/bitops.h>
 
+#include <asm/bug.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
@@ -415,12 +416,11 @@
        struct baycom_state *bc;
        struct baycom_ioctl bi;
 
-       if (!dev || !dev->priv ||
-           ((struct baycom_state *)dev->priv)->hdrv.magic != HDLCDRV_MAGIC) {
-               printk(KERN_ERR "bc_ioctl: invalid device struct\n");
+       if (!dev)
                return -EINVAL;
-       }
+
        bc = netdev_priv(dev);
+       BUG_ON(bc->hdrv.magic != HDLCDRV_MAGIC);
 
        if (cmd != SIOCDEVPRIVATE)
                return -ENOIOCTLCMD;
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to