diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-14 07:11:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-14 07:11:17 +0200 |
commit | 45000aac11315d7ccbaeefa29cafc8303ac206cb (patch) | |
tree | 0bddc2c0cb20514ee080062899020d1ee4d7bb12 /drivers/mtd | |
parent | 36acabd5c522501bd7da8eb7a21c865fc78676ee (diff) | |
parent | 7721719313bc47e0eb90d45c00d67233d698bd2f (diff) | |
download | barebox-45000aac11315d7ccbaeefa29cafc8303ac206cb.tar.gz barebox-45000aac11315d7ccbaeefa29cafc8303ac206cb.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/core.c | 3 | ||||
-rw-r--r-- | drivers/mtd/mtdraw.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/nand-bb.c | 3 | ||||
-rw-r--r-- | drivers/mtd/nor/cfi_flash.c | 3 | ||||
-rw-r--r-- | drivers/mtd/nor/cfi_flash.h | 3 | ||||
-rw-r--r-- | drivers/mtd/ubi/build.c | 8 |
6 files changed, 9 insertions, 13 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c index 881b5f4864..1625d938ea 100644 --- a/drivers/mtd/core.c +++ b/drivers/mtd/core.c @@ -3,9 +3,6 @@ * 2N Telekomunikace, a.s. <www.2n.cz> * Ladislav Michl <michl@2n.cz> * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c index f63da7b3b2..b71619244b 100644 --- a/drivers/mtd/mtdraw.c +++ b/drivers/mtd/mtdraw.c @@ -306,7 +306,7 @@ static int add_mtdraw_device(struct mtd_info *mtd, const char *devname, void **p mtdraw->mtd = mtd; mtdraw->cdev.ops = (struct cdev_operations *)&mtd_raw_fops; - mtdraw->cdev.size = mtd_div_by_wb(mtd->size, mtd) * mtdraw->rps; + mtdraw->cdev.size = (loff_t)mtd_div_by_wb(mtd->size, mtd) * mtdraw->rps; mtdraw->cdev.name = basprintf("%s.raw", mtd->cdev.name); mtdraw->cdev.priv = mtdraw; mtdraw->cdev.dev = &mtd->class_dev; diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c index e578d72a49..c0104c5936 100644 --- a/drivers/mtd/nand/nand-bb.c +++ b/drivers/mtd/nand/nand-bb.c @@ -1,9 +1,6 @@ /* * Copyright (c) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c index 01ab1aa274..430f926e8c 100644 --- a/drivers/mtd/nor/cfi_flash.c +++ b/drivers/mtd/nor/cfi_flash.c @@ -11,9 +11,6 @@ * Copyright (C) 2006 * Tolunay Orkun <listmember@orkun.us> * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of diff --git a/drivers/mtd/nor/cfi_flash.h b/drivers/mtd/nor/cfi_flash.h index e82eb28abe..cea6a8712c 100644 --- a/drivers/mtd/nor/cfi_flash.h +++ b/drivers/mtd/nor/cfi_flash.h @@ -5,9 +5,6 @@ * (C) Copyright 2000-2005 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 604fe87e53..da409010f7 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -508,6 +508,14 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, struct ubi_device *ubi; int i, err, ref = 0; + /* + * Do not try to attach an UBI device if this device has partitions + * as it's not a good idea to attach UBI on a raw device when the + * real UBI only spans the first partition. + */ + if (!list_empty(&mtd->partitions)) + return -EBUSY; + if (max_beb_per1024 < 0 || max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT) return -EINVAL; |