* [patch -v3 17/22] aty: use memory_read_from_buffer
[not found] <20080604115633.116832712@gmail.com>
@ 2008-06-04 11:56 ` Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2008-06-04 11:56 UTC (permalink / raw)
To: linux-kernel, akpm; +Cc: Benjamin Herrenschmidt, linux-fbdev-devel
[-- Attachment #1: aty-use-memory-read-from-buffer.patch --]
[-- Type: text/plain, Size: 1284 bytes --]
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-fbdev-devel@lists.sourceforge.net
---
drivers/video/aty/radeon_base.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
Index: 2.6-git/drivers/video/aty/radeon_base.c
===================================================================
--- 2.6-git.orig/drivers/video/aty/radeon_base.c
+++ 2.6-git/drivers/video/aty/radeon_base.c
@@ -70,6 +70,7 @@
#include <linux/pci.h>
#include <linux/vmalloc.h>
#include <linux/device.h>
+#include <linux/fs.h>
#include <asm/io.h>
#include <linux/uaccess.h>
@@ -2098,15 +2099,7 @@ static void radeon_identify_vram(struct
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);
}
--
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-04 12:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080604115633.116832712@gmail.com>
2008-06-04 11:56 ` [patch -v3 17/22] aty: use memory_read_from_buffer Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).