Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756874AbZFJBqM (ORCPT ); Tue, 9 Jun 2009 21:46:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752587AbZFJBqG (ORCPT ); Tue, 9 Jun 2009 21:46:06 -0400 Received: from rex.securecomputing.com ([203.24.151.4]:34037 "EHLO cyberguard.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752205AbZFJBqF (ORCPT ); Tue, 9 Jun 2009 21:46:05 -0400 Message-ID: <4A2F105C.2040206@snapgear.com> Date: Wed, 10 Jun 2009 11:46:04 +1000 From: Greg Ungerer User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: uClinux development list CC: linux-kernel@vger.kernel.org, Timofei Bondarenko , linux-mtd@lists.infradead.org, uclinux-dist-devel@blackfin.uclinux.org Subject: Re: [uClinux-dev] [PATCH 1/2] mtd/maps: uclinux: fix building when partition support is disabled References: <1243331191-11445-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1243331191-11445-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2027 Lines: 61 Mike Frysinger wrote: > From: Timofei Bondarenko > > The uClinux map driver doesn't even use partitions, so we shouldn't require > it in order to work properly. > > Signed-off-by: Timofei Bondarenko > Signed-off-by: Mike Frysinger > Signed-off-by: Sonic Zhang > CC: Greg Ungerer Acked-by: Greg Ungerer > CC: uclinux-dev@uclinux.org > CC: linux-mtd@lists.infradead.org > --- > drivers/mtd/maps/uclinux.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c > index 81756e3..57699c2 100644 > --- a/drivers/mtd/maps/uclinux.c > +++ b/drivers/mtd/maps/uclinux.c > @@ -87,7 +87,11 @@ static int __init uclinux_mtd_init(void) > mtd->priv = mapp; > > uclinux_ram_mtdinfo = mtd; > +#ifdef CONFIG_MTD_PARTITIONS > add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS); > +#else > + add_mtd_device(mtd); > +#endif > > return(0); > } > @@ -97,7 +101,11 @@ static int __init uclinux_mtd_init(void) > static void __exit uclinux_mtd_cleanup(void) > { > if (uclinux_ram_mtdinfo) { > +#ifdef CONFIG_MTD_PARTITIONS > del_mtd_partitions(uclinux_ram_mtdinfo); > +#else > + del_mtd_device(uclinux_ram_mtdinfo); > +#endif > map_destroy(uclinux_ram_mtdinfo); > uclinux_ram_mtdinfo = NULL; > } -- ------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com SnapGear Group, McAfee PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/