Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a882ef47 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

aty: use memory_read_from_buffer()



Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1c554ff9
Loading
Loading
Loading
Loading
+1 −9
Original line number Original line Diff line number Diff line
@@ -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)
static ssize_t radeon_show_one_edid(char *buf, loff_t off, size_t count, const u8 *edid)
{
{
	if (off > EDID_LENGTH)
	return memory_read_from_buffer(buf, count, &off, edid, EDID_LENGTH);
		return 0;

	if (off + count > EDID_LENGTH)
		count = EDID_LENGTH - off;

	memcpy(buf, edid + off, count);

	return count;
}
}