On Thu, Mar 3, 2011 at 9:54 AM, Ira W. Snyder <i...@ovro.caltech.edu> wrote: > This makes debugging the driver much easier when multiple channels are > running concurrently. In addition, you can see how much descriptor > memory each channel has allocated via the dmapool API in sysfs. > > Signed-off-by: Ira W. Snyder <i...@ovro.caltech.edu> > --- > drivers/dma/fsldma.c | 69 +++++++++++++++++++++++++------------------------ > drivers/dma/fsldma.h | 1 + > 2 files changed, 36 insertions(+), 34 deletions(-) > > diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c > index 2e1af45..e535cd1 100644 > --- a/drivers/dma/fsldma.c > +++ b/drivers/dma/fsldma.c > @@ -37,7 +37,12 @@ > > #include "fsldma.h" > > -static const char msg_ld_oom[] = "No free memory for link descriptor\n"; > +#define chan_dbg(chan, fmt, arg...) \ > + dev_dbg(chan->dev, "%s: " fmt, chan->name, ##arg) > +#define chan_err(chan, fmt, arg...) \ > + dev_err(chan->dev, "%s: " fmt, chan->name, ##arg) > +
I already have this applied, but if you want to send an incremental cleanup patch you could achieve a similar effect without increasing the size of fsldma_chan by using the class device that is created by dma_async_device_register. Something like: #define to_chan_dev(chan) (&chan->common.dev->device) #define chan_err(chan, fmt, arg...) \ dev_err(chan->dev, "%s: " fmt, dev_name(to_chan_dev(chan)), ##arg) ...where dev_name() returns something like "dma0chan0". -- Dan _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev