From: Ian Abbott Date: Wed, 6 Jun 2012 10:02:27 +0000 (+0100) Subject: ni_mio_common: ni_release_gpct_mite_channel only used for PCI. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0bd638c43e03d94569f606a4755b68a4bc648ab0;p=comedi.git ni_mio_common: ni_release_gpct_mite_channel only used for PCI. The ni_release_gpct_mite_channel() function is static, but only called from code within '#ifdef PCIDMA'. Wrap the whole function within a '#ifdef PCIDMA'/'#endif' pair to avoid compiler warning about unused function for the ni_atmio driver. Signed-off-by: Ian Abbott --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 537990b0..b8c70d1b 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -600,10 +600,10 @@ static void ni_release_ao_mite_channel(comedi_device * dev) #endif // PCIDMA } +#ifdef PCIDMA static void ni_release_gpct_mite_channel(comedi_device * dev, unsigned gpct_index) { -#ifdef PCIDMA unsigned long flags; BUG_ON(gpct_index >= NUM_GPCT); @@ -618,8 +618,8 @@ static void ni_release_gpct_mite_channel(comedi_device * dev, mite_release_channel(mite_chan); } comedi_spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags); -#endif // PCIDMA } +#endif // PCIDMA static void ni_release_cdo_mite_channel(comedi_device * dev) {