From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>,
Russell King <linux@arm.linux.org.uk>,
dedekind1@gmail.com
Subject: [PATCH 05/43] mtd: dc21285.c: use mtd_device_parse_register
Date: Wed, 8 Jun 2011 20:05:14 +0400 [thread overview]
Message-ID: <1307549152-7085-6-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1307549152-7085-1-git-send-email-dbaryshkov@gmail.com>
Replace custom invocations of parse_mtd_partitions and mtd_device_register
with common mtd_device_parse_register call. This would bring: standard
handling of all errors, fallback to default partitions, etc.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
drivers/mtd/maps/dc21285.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
index 7a9e198..f43b365 100644
--- a/drivers/mtd/maps/dc21285.c
+++ b/drivers/mtd/maps/dc21285.c
@@ -145,14 +145,10 @@ static struct map_info dc21285_map = {
/* Partition stuff */
-static struct mtd_partition *dc21285_parts;
static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
static int __init init_dc21285(void)
{
-
- int nrparts;
-
/* Determine bankwidth */
switch (*CSR_SA110_CNTL & (3<<14)) {
case SA110_CNTL_ROMWIDTH_8:
@@ -200,8 +196,7 @@ static int __init init_dc21285(void)
dc21285_mtd->owner = THIS_MODULE;
- nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0);
- mtd_device_register(dc21285_mtd, dc21285_parts, nrparts);
+ mtd_device_parse_register(dc21285_mtd, probes, 0, NULL, 0);
if(machine_is_ebsa285()) {
/*
@@ -224,8 +219,6 @@ static int __init init_dc21285(void)
static void __exit cleanup_dc21285(void)
{
mtd_device_unregister(dc21285_mtd);
- if (dc21285_parts)
- kfree(dc21285_parts);
map_destroy(dc21285_mtd);
iounmap(dc21285_map.virt);
}
--
1.7.4.4
next prev parent reply other threads:[~2011-06-08 16:06 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 16:05 [PATCH 0/43 V2] mtd: simplify mtd partitions handling Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 01/43] mtd: add new API for handling MTD registration Dmitry Eremin-Solenikov
2011-06-09 7:20 ` Artem Bityutskiy
2011-06-08 16:05 ` [PATCH 02/43] mtd: mtd_dataflash.c: use mtd_device_parse_register Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 03/43] mtd: sst25l.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 04/43] mtd: bfin-async-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` Dmitry Eremin-Solenikov [this message]
2011-06-08 16:05 ` [PATCH 06/43] mtd: gpio-addr-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 07/43] mtd: h720x-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 08/43] mtd: impa7.c: " Dmitry Eremin-Solenikov
2011-06-09 7:24 ` Artem Bityutskiy
2011-06-08 16:05 ` [PATCH 09/43] mtd: intel_vr_nor.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 10/43] mtd: ixp2000.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 11/43] mtd: ixp4xx.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 12/43] mtd: lantiq-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 13/43] mtd: latch-addr-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 14/43] mtd: physmap.c: " Dmitry Eremin-Solenikov
2011-06-09 7:32 ` Artem Bityutskiy
2011-06-08 16:05 ` [PATCH 15/43] mtd: plat-ram.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 16/43] mtd: pxa2xx-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 17/43] mtd: rbtx4939-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 18/43] mtd: sa1100-flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 19/43] mtd: solutionengine.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 20/43] mtd: wr_sbc82xx_flash.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 21/43] mtd: atmel_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 22/43] mtd: bcm_umi_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 23/43] mtd: cafe_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 24/43] mtd: cmx270_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 25/43] mtd: cs553x_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 26/43] mtd: davinci_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 27/43] mtd: edb7312.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 28/43] mtd: fsmc_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 29/43] mtd: h1910.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 30/43] mtd: jz4740_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 31/43] mtd: mxc_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 32/43] mtd: omap2.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 33/43] mtd: orion_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 34/43] mtd: plat_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 35/43] mtd: ppchameleonevb.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 36/43] mtd: pxa3xx_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 37/43] mtd: s3c2410.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 38/43] mtd: sharpsl.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 39/43] mtd: tmio_nand.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 40/43] mtd: txx9ndfmc.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 41/43] mtd: onenand/generic.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 42/43] mtd: onenand/omap2.c: " Dmitry Eremin-Solenikov
2011-06-08 16:05 ` [PATCH 43/43] mtd: onenand/samsung.c: " Dmitry Eremin-Solenikov
2011-06-09 7:56 ` [PATCH 0/43 V2] mtd: simplify mtd partitions handling Artem Bityutskiy
2011-06-09 8:23 ` Dmitry Eremin-Solenikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307549152-7085-6-git-send-email-dbaryshkov@gmail.com \
--to=dbaryshkov@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).