diff options
Diffstat (limited to 'drivers/usb/mon/mon_text.c')
-rw-r--r-- | drivers/usb/mon/mon_text.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 31c11888ec6..a545d65f6e5 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c @@ -7,6 +7,7 @@ #include <linux/kernel.h> #include <linux/list.h> #include <linux/usb.h> +#include <linux/slab.h> #include <linux/time.h> #include <linux/mutex.h> #include <linux/debugfs.h> @@ -158,11 +159,9 @@ static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb, if (src == NULL) return 'Z'; /* '0' would be not as pretty. */ } else { - struct scatterlist *sg = urb->sg->sg; + struct scatterlist *sg = urb->sg; - /* If IOMMU coalescing occurred, we cannot trust sg_page */ - if (urb->sg->nents != urb->num_sgs || - PageHighMem(sg_page(sg))) + if (PageHighMem(sg_page(sg))) return 'D'; /* For the text interface we copy only the first sg buffer */ |