linux-hams.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8/9] Use netdev_priv in baycom_ser_fdx driver
@ 2005-01-30 21:46 Ralf Baechle DL5RB
  0 siblings, 0 replies; only message in thread
From: Ralf Baechle DL5RB @ 2005-01-30 21:46 UTC (permalink / raw)
  To: linux-hams; +Cc: Jeff Garzik, Thomas Sailer

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_ser_fdx.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Index: bk-afu/drivers/net/hamradio/baycom_ser_fdx.c
===================================================================
--- bk-afu.orig/drivers/net/hamradio/baycom_ser_fdx.c
+++ bk-afu/drivers/net/hamradio/baycom_ser_fdx.c
@@ -530,12 +530,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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-30 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-30 21:46 [PATCH 8/9] Use netdev_priv in baycom_ser_fdx driver Ralf Baechle DL5RB

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).