Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
[pandora-kernel.git] / drivers / usb / mon / mon_bin.c
index 5594772..61c76b1 100644 (file)
@@ -416,13 +416,13 @@ static unsigned int mon_bin_get_data(const struct mon_reader_bin *rp,
 
        } else {
                /* If IOMMU coalescing occurred, we cannot trust sg_page */
-               if (urb->sg->nents != urb->num_sgs) {
+               if (urb->transfer_flags & URB_DMA_SG_COMBINED) {
                        *flag = 'D';
                        return length;
                }
 
                /* Copy up to the first non-addressable segment */
-               for_each_sg(urb->sg->sg, sg, urb->num_sgs, i) {
+               for_each_sg(urb->sg, sg, urb->num_sgs, i) {
                        if (length == 0 || PageHighMem(sg_page(sg)))
                                break;
                        this_len = min_t(unsigned int, sg->length, length);