From: Akinobu Mita Date: Thu, 24 Jul 2008 04:31:33 +0000 (-0700) Subject: aty: use memory_read_from_buffer() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a882ef47c7156e8cc47e72f2aa396f2514569c48;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git aty: use memory_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Benjamin Herrenschmidt Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 3c0a03f69d83..652273e9f5f9 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c @@ -2098,15 +2098,7 @@ static void radeon_identify_vram(struct radeonfb_info *rinfo) static ssize_t radeon_show_one_edid(char *buf, loff_t off, size_t count, const u8 *edid) { - if (off > EDID_LENGTH) - return 0; - - if (off + count > EDID_LENGTH) - count = EDID_LENGTH - off; - - memcpy(buf, edid + off, count); - - return count; + return memory_read_from_buffer(buf, count, &off, edid, EDID_LENGTH); }