Devicetree
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Mingkai Hu <Mingkai.hu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: mtd: fix build error in m25p80.c
Date: Sat, 30 Oct 2010 06:57:37 +0100	[thread overview]
Message-ID: <20101030055737.GA2456@angua.secretlab.ca> (raw)
In-Reply-To: <20101029210419.70f99e96-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>

On Fri, Oct 29, 2010 at 09:04:19PM -0700, Andres Salomon wrote:
> 
> While building an x86 distro kernel, I hit the following:
> 
> Kernel: arch/x86/boot/bzImage is ready  (#7)
> ERROR: "of_mtd_parse_partitions" [drivers/mtd/devices/m25p80.ko]
> undefined!
> 
> of_mtd_parse_partitions is defined with MTD_OF_PARTS, and that's only
> built on PPC and microblaze.  The code in question should be wrapped w/
> a stricter #ifdef.
> 
> Signed-off-by: Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
> ---
>  drivers/mtd/devices/m25p80.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index ea22520..184ddd5 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -924,7 +924,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
>  			nr_parts = data->nr_parts;
>  		}
>  
> -#ifdef CONFIG_OF
> +#ifdef CONFIG_MTD_OF_PARTS
>  		if (nr_parts <= 0 && spi->dev.of_node) {
>  			nr_parts = of_mtd_parse_partitions(&spi->dev,
>  					spi->dev.of_node, &parts);

True; but CONFIG_MTD_OF_PARTS should be built on all architectures
when CONFIG_OF & CONFIG_MTD_PARTITIONS is set.  I'll craft a patch.

g.

      parent reply	other threads:[~2010-10-30  5:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30  4:04 mtd: fix build error in m25p80.c Andres Salomon
     [not found] ` <20101029210419.70f99e96-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
2010-10-30  5:57   ` Grant Likely [this message]

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=20101030055737.GA2456@angua.secretlab.ca \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=Mingkai.hu-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    /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