From 47870d364b71eb2a6da812479c451f93a770fb97 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 1 Nov 2012 14:02:13 +0000 Subject: [PATCH] --- yaml --- r: 337543 b: refs/heads/master c: 99633048bf82327e5ef752627e27a0f031701000 h: refs/heads/master i: 337541: e50506d2b6b2095a59b41e321e60553e3b652ad6 337539: 13f3c32407f813e2ce643ba06308f6af482123ad 337535: 858a7d952762019fc7c1d2d2df5b116b3da895d8 v: v3 --- [refs] | 2 +- trunk/drivers/staging/comedi/drivers/skel.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index b5477f5a7673..70766c19508b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a29f7a9525f9d8bae1614c0295a008029dfd3079 +refs/heads/master: 99633048bf82327e5ef752627e27a0f031701000 diff --git a/trunk/drivers/staging/comedi/drivers/skel.c b/trunk/drivers/staging/comedi/drivers/skel.c index e1b78a111960..76c6df45baa4 100644 --- a/trunk/drivers/staging/comedi/drivers/skel.c +++ b/trunk/drivers/staging/comedi/drivers/skel.c @@ -125,11 +125,6 @@ static DEFINE_PCI_DEVICE_TABLE(skel_pci_table) = { MODULE_DEVICE_TABLE(pci, skel_pci_table); -/* - * Useful for shorthand access to the particular board structure - */ -#define thisboard ((const struct skel_board *)dev->board_ptr) - /* this structure is for data unique to this hardware driver. If several hardware drivers keep similar information in this structure, feel free to suggest moving the variable to the struct comedi_device struct. @@ -205,6 +200,7 @@ static int skel_ns_to_timer(unsigned int *ns, int round); */ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it) { + const struct skel_board *thisboard; struct skel_private *devpriv; struct comedi_subdevice *s; int ret; @@ -218,9 +214,9 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it) */ /* dev->board_ptr = skel_probe(dev, it); */ + thisboard = comedi_board(dev); /* - * Initialize dev->board_name. Note that we can use the "thisboard" - * macro now, since we just initialized it in the last line. + * Initialize dev->board_name. */ dev->board_name = thisboard->name; @@ -300,6 +296,7 @@ static void skel_detach(struct comedi_device *dev) static int skel_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct skel_board *thisboard = comedi_board(dev); int n, i; unsigned int d; unsigned int status;