Re: [PATCH 3/9] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 06-05-15 12:46:42, Vlastimil Babka wrote:
> On 05/06/2015 09:28 AM, Jan Kara wrote:
> >Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns() instead of
> >hand made mapping of virtual address to physical address. Also the
> >function leaked page reference from get_user_pages() so fix that by
> >properly release the reference when omap_vout_buffer_release() is
> >called.
> >
> >Signed-off-by: Jan Kara <jack@xxxxxxx>
> >---
> >  drivers/media/platform/omap/omap_vout.c | 67 +++++++++++++++------------------
> >  1 file changed, 31 insertions(+), 36 deletions(-)
> >
> 
> ...
> 
> >+	vec = frame_vector_create(1);
> >+	if (!vec)
> >+		return -ENOMEM;
> >
> >-		if (res == nr_pages) {
> >-			physp =  __pa(page_address(&pages[0]) +
> >-					(virtp & ~PAGE_MASK));
> >-		} else {
> >-			printk(KERN_WARNING VOUT_NAME
> >-					"get_user_pages failed\n");
> >-			return 0;
> >-		}
> >+	ret = get_vaddr_frames(virtp, 1, 1, 0, vec);
> 
> Use true/false where appropriate.
  Right. Thanks.

								Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux