9
0
Fork 0

devfs-code: fix warning

/opt/work/barebox/fs/devfs-core.c: In function 'partition_ioctl':
/opt/work/barebox/fs/devfs-core.c:109:27: warning: unused variable 'reg'

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-01-12 15:41:14 +01:00 committed by Sascha Hauer
parent d002818ae3
commit 440aec700a
1 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,6 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf)
int ret = 0;
size_t offset;
struct mtd_info_user *user = buf;
struct region_info_user *reg = buf;
switch (request) {
case MEMSETBADBLOCK:
@ -146,6 +145,8 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf)
#ifdef CONFIG_PARTITION
case MEMGETREGIONINFO:
if (cdev->mtd) {
struct region_info_user *reg = buf;
reg->offset = cdev->offset;
reg->erasesize = cdev->mtd->erasesize;
reg->numblocks = cdev->size/reg->erasesize;