X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fdevices%2Fmtdram.c;h=3aaca88847d39cec5421a072b13609bd25796cda;hb=a09e64fbc0094e3073dbb09c3b4bfe4ab669244b;hp=e427c82d5f4cb046ff4234e4ce8919062569fda3;hpb=ae3e0218621db0590163b2d5c424ef1f340e3cc6;p=linux-2.6 diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index e427c82d5f..3aaca88847 100644 --- a/drivers/mtd/devices/mtdram.c +++ b/drivers/mtd/devices/mtdram.c @@ -1,6 +1,5 @@ /* * mtdram - a test mtd device - * $Id: mtdram.c,v 1.37 2005/04/21 03:42:11 joern Exp $ * Author: Alexander Larsson * * Copyright (c) 1999 Alexander Larsson @@ -17,6 +16,7 @@ #include #include #include +#include static unsigned long total_size = CONFIG_MTDRAM_TOTAL_SIZE; static unsigned long erase_size = CONFIG_MTDRAM_ERASE_SIZE; @@ -47,18 +47,21 @@ static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) } static int ram_point(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char **mtdbuf) + size_t *retlen, void **virt, resource_size_t *phys) { if (from + len > mtd->size) return -EINVAL; - *mtdbuf = mtd->priv + from; + /* can we return a physical address with this driver? */ + if (phys) + return -EINVAL; + + *virt = mtd->priv + from; *retlen = len; return 0; } -static void ram_unpoint(struct mtd_info *mtd, u_char * addr, loff_t from, - size_t len) +static void ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) { }