linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: onenand: omap: remove two unused functions
@ 2013-08-07 18:16 Paul Bolle
  2013-09-17  2:24 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Bolle @ 2013-08-07 18:16 UTC (permalink / raw)
  To: Kyungmin Park, David Woodhouse; +Cc: linux-mtd, linux-kernel

Nothing calls omap2_onenand_rephase(). And __adjust_timing() is only
called by omap2_onenand_rephase(). Remove these two unused functions.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Completely untested.

 drivers/mtd/onenand/omap2.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index d98b198..1d43fdc 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -573,28 +573,6 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area,
 
 static struct platform_driver omap2_onenand_driver;
 
-static int __adjust_timing(struct device *dev, void *data)
-{
-	int ret = 0;
-	struct omap2_onenand *c;
-
-	c = dev_get_drvdata(dev);
-
-	BUG_ON(c->setup == NULL);
-
-	/* DMA is not in use so this is all that is needed */
-	/* Revisit for OMAP3! */
-	ret = c->setup(c->onenand.base, &c->freq);
-
-	return ret;
-}
-
-int omap2_onenand_rephase(void)
-{
-	return driver_for_each_device(&omap2_onenand_driver.driver, NULL,
-				      NULL, __adjust_timing);
-}
-
 static void omap2_onenand_shutdown(struct platform_device *pdev)
 {
 	struct omap2_onenand *c = dev_get_drvdata(&pdev->dev);
-- 
1.8.1.4


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

* Re: [PATCH] mtd: onenand: omap: remove two unused functions
  2013-08-07 18:16 [PATCH] mtd: onenand: omap: remove two unused functions Paul Bolle
@ 2013-09-17  2:24 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2013-09-17  2:24 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Kyungmin Park, David Woodhouse, linux-mtd, linux-kernel

On Wed, Aug 07, 2013 at 08:16:49PM +0200, Paul Bolle wrote:
> Nothing calls omap2_onenand_rephase(). And __adjust_timing() is only
> called by omap2_onenand_rephase(). Remove these two unused functions.
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Completely untested.

Compile-tested successfully here. And it gets rid of a few sparse warnings:

  drivers/mtd/onenand/omap2.c:592:5: warning: no previous prototype for 'omap2_onenand_rephase' [-Wmissing-prototypes]
  drivers/mtd/onenand/omap2.c:592:5: warning: symbol 'omap2_onenand_rephase' was not declared. Should it be static? [sparse]

Applied to l2-mtd.git. Thanks!

Brian

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

end of thread, other threads:[~2013-09-17  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 18:16 [PATCH] mtd: onenand: omap: remove two unused functions Paul Bolle
2013-09-17  2:24 ` Brian Norris

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