linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: onenand/omap2.c: fix build error
@ 2011-06-17  8:09 Axel Lin
  2011-06-17  8:11 ` [PATCH 2/2] mtd: onenand/samsung.c: " Axel Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-06-17  8:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dmitry Eremin-Solenikov, Artem Bityutskiy, Kyungmin Park,
	David Woodhouse, linux-mtd

Fix below build error:
  CC      drivers/mtd/onenand/omap2.o
drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe':
drivers/mtd/onenand/omap2.c:754: error: 'info' undeclared (first use in this function)
drivers/mtd/onenand/omap2.c:754: error: (Each undeclared identifier is reported only once
drivers/mtd/onenand/omap2.c:754: error: for each function it appears in.)
make[3]: *** [drivers/mtd/onenand/omap2.o] Error 1
make[2]: *** [drivers/mtd/onenand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mtd/onenand/omap2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index eb9cbd9..06efa14 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -751,7 +751,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
 	if ((r = onenand_scan(&c->mtd, 1)) < 0)
 		goto err_release_regulator;
 
-	r = mtd_device_parse_register(&info->mtd, NULL, 0,
+	r = mtd_device_parse_register(&c->mtd, NULL, 0,
 			pdata ? pdata->parts : NULL,
 			pdata ? pdata->nr_parts : 0);
 	if (r)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] mtd: onenand/samsung.c: fix build error
  2011-06-17  8:09 [PATCH 1/2] mtd: onenand/omap2.c: fix build error Axel Lin
@ 2011-06-17  8:11 ` Axel Lin
  2011-06-17 17:10   ` Brian Norris
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-06-17  8:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dmitry Eremin-Solenikov, Artem Bityutskiy, Kyungmin Park,
	David Woodhouse, linux-mtd

Fix below build error:
  CC      drivers/mtd/onenand/samsung.o
drivers/mtd/onenand/samsung.c: In function 's3c_onenand_probe':
drivers/mtd/onenand/samsung.c:1017: error: 'info' undeclared (first use in this function)
drivers/mtd/onenand/samsung.c:1017: error: (Each undeclared identifier is reported only once
drivers/mtd/onenand/samsung.c:1017: error: for each function it appears in.)
make[3]: *** [drivers/mtd/onenand/samsung.o] Error 1
make[2]: *** [drivers/mtd/onenand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mtd/onenand/samsung.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index 597dffc..d324074 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -1014,7 +1014,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
 	if (s3c_read_reg(MEM_CFG_OFFSET) & ONENAND_SYS_CFG1_SYNC_READ)
 		dev_info(&onenand->pdev->dev, "OneNAND Sync. Burst Read enabled\n");
 
-	err = mtd_device_parse_register(&info->mtd, NULL, 0,
+	err = mtd_device_parse_register(onenand->mtd, NULL, 0,
 			pdata ? pdata->parts : NULL,
 			pdata ? pdata->nr_parts : 0);
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] mtd: onenand/samsung.c: fix build error
  2011-06-17  8:11 ` [PATCH 2/2] mtd: onenand/samsung.c: " Axel Lin
@ 2011-06-17 17:10   ` Brian Norris
  2011-06-22  5:07     ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Norris @ 2011-06-17 17:10 UTC (permalink / raw)
  To: Axel Lin
  Cc: Artem Bityutskiy, Dmitry Eremin-Solenikov, linux-kernel,
	Kyungmin Park, linux-mtd, David Woodhouse

Hi,

On Fri, Jun 17, 2011 at 1:11 AM, Axel Lin <axel.lin@gmail.com> wrote:
> -       err = mtd_device_parse_register(&info->mtd, NULL, 0,
> +       err = mtd_device_parse_register(onenand->mtd, NULL, 0,
>                        pdata ? pdata->parts : NULL,
>                        pdata ? pdata->nr_parts : 0);

Wouldn't it be just the same (and shorter) to use "mtd" instead of
onenand->mtd? Like:

       err = mtd_device_parse_register(mtd, NULL, 0,
                     pdata ? pdata->parts : NULL,
                     pdata ? pdata->nr_parts : 0);

Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] mtd: onenand/samsung.c: fix build error
  2011-06-17 17:10   ` Brian Norris
@ 2011-06-22  5:07     ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-06-22  5:07 UTC (permalink / raw)
  To: Brian Norris
  Cc: Artem Bityutskiy, Dmitry Eremin-Solenikov, linux-kernel,
	Kyungmin Park, linux-mtd, Axel Lin, David Woodhouse

On Fri, 2011-06-17 at 10:10 -0700, Brian Norris wrote:
> Hi,
> 
> On Fri, Jun 17, 2011 at 1:11 AM, Axel Lin <axel.lin@gmail.com> wrote:
> > -       err = mtd_device_parse_register(&info->mtd, NULL, 0,
> > +       err = mtd_device_parse_register(onenand->mtd, NULL, 0,
> >                        pdata ? pdata->parts : NULL,
> >                        pdata ? pdata->nr_parts : 0);

Yeah, just did this, thanks.

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-22  5:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17  8:09 [PATCH 1/2] mtd: onenand/omap2.c: fix build error Axel Lin
2011-06-17  8:11 ` [PATCH 2/2] mtd: onenand/samsung.c: " Axel Lin
2011-06-17 17:10   ` Brian Norris
2011-06-22  5:07     ` Artem Bityutskiy

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).