linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@queued.net>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fbdev@vger.kernel.org
Subject: [PATCH] video/tmiofb: silence warnings introduced by mfd changes
Date: Tue, 01 Mar 2011 18:53:22 +0000	[thread overview]
Message-ID: <20110301105322.48754094@debxo> (raw)
In-Reply-To: <20110301154230.df32be17.sfr@canb.auug.org.au>

On Tue, 1 Mar 2011 15:42:30 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Samuel,
> 
> After merging the mfd tree, today's linux-next build (x86_64
> allmodconfig) produced these warnings:
> 
> drivers/video/tmiofb.c: In function 'tmiofb_hw_init':
> drivers/video/tmiofb.c:270: warning: initialization discards
> qualifiers from pointer target type drivers/video/tmiofb.c: In
> function 'tmiofb_hw_mode': drivers/video/tmiofb.c:314: warning:
> initialization discards qualifiers from pointer target type
> drivers/video/tmiofb.c:314: warning: unused variable 'cell'
> drivers/video/tmiofb.c: In function 'tmiofb_probe':
> drivers/video/tmiofb.c:683: warning: initialization discards
> qualifiers from pointer target type drivers/video/tmiofb.c: In
> function 'tmiofb_remove': drivers/video/tmiofb.c:811: warning:
> initialization discards qualifiers from pointer target type
> drivers/video/tmiofb.c: In function 'tmiofb_suspend':
> drivers/video/tmiofb.c:941: warning: initialization discards
> qualifiers from pointer target type drivers/video/tmiofb.c: In
> function 'tmiofb_resume': drivers/video/tmiofb.c:973: warning:
> initialization discards qualifiers from pointer target type
> 
> Introduced by commits 2a79bb1d72f5ac22dff96de340d90d512f852ecb ("mfd:
> mfd_cell is now implicitly available to tc6393xb drivers") and
> b6361637190e6cb7acb84509499942ada69e7136 ("fb: Use mfd_data instead of
> driver_data for tmio-fb").
> 

Oops, this should fix that.




From: Andres Salomon <dilinger@queued.net>

This silences warnings such as

drivers/video/tmiofb.c: In function 'tmiofb_hw_init':
drivers/video/tmiofb.c:270: warning: initialization discards qualifiers from pointer target type

These were added by me in commit 2a79bb1d.

Signed-off-by: Andres Salomon <dilinger@queued.net>
---
 drivers/video/tmiofb.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
index 7e57d3b..9710bf8 100644
--- a/drivers/video/tmiofb.c
+++ b/drivers/video/tmiofb.c
@@ -267,7 +267,7 @@ static int tmiofb_hw_stop(struct platform_device *dev)
  */
 static int tmiofb_hw_init(struct platform_device *dev)
 {
-	struct mfd_cell *cell = mfd_get_cell(dev);
+	const struct mfd_cell *cell = mfd_get_cell(dev);
 	struct fb_info *info = platform_get_drvdata(dev);
 	struct tmiofb_par *par = info->par;
 	const struct resource *nlcr = &cell->resources[0];
@@ -311,7 +311,6 @@ static int tmiofb_hw_init(struct platform_device *dev)
  */
 static void tmiofb_hw_mode(struct platform_device *dev)
 {
-	struct mfd_cell *cell = mfd_get_cell(dev);
 	struct tmio_fb_data *data = mfd_get_data(dev);
 	struct fb_info *info = platform_get_drvdata(dev);
 	struct fb_videomode *mode = info->mode;
@@ -680,7 +679,7 @@ static struct fb_ops tmiofb_ops = {
 
 static int __devinit tmiofb_probe(struct platform_device *dev)
 {
-	struct mfd_cell *cell = mfd_get_cell(dev);
+	const struct mfd_cell *cell = mfd_get_cell(dev);
 	struct tmio_fb_data *data = mfd_get_data(dev);
 	struct resource *ccr = platform_get_resource(dev, IORESOURCE_MEM, 1);
 	struct resource *lcr = platform_get_resource(dev, IORESOURCE_MEM, 0);
@@ -808,7 +807,7 @@ err_ioremap_ccr:
 
 static int __devexit tmiofb_remove(struct platform_device *dev)
 {
-	struct mfd_cell *cell = mfd_get_cell(dev);
+	const struct mfd_cell *cell = mfd_get_cell(dev);
 	struct fb_info *info = platform_get_drvdata(dev);
 	int irq = platform_get_irq(dev, 0);
 	struct tmiofb_par *par;
@@ -938,7 +937,7 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
 #ifdef CONFIG_FB_TMIO_ACCELL
 	struct tmiofb_par *par = info->par;
 #endif
-	struct mfd_cell *cell = mfd_get_cell(dev);
+	const struct mfd_cell *cell = mfd_get_cell(dev);
 	int retval = 0;
 
 	console_lock();
@@ -970,7 +969,7 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
 static int tmiofb_resume(struct platform_device *dev)
 {
 	struct fb_info *info = platform_get_drvdata(dev);
-	struct mfd_cell *cell = mfd_get_cell(dev);
+	const struct mfd_cell *cell = mfd_get_cell(dev);
 	int retval = 0;
 
 	console_lock();
-- 
1.7.2.3






       reply	other threads:[~2011-03-01 18:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110301154230.df32be17.sfr@canb.auug.org.au>
2011-03-01 18:53 ` Andres Salomon [this message]
2011-03-01 20:32   ` [PATCH] tmio: silence warnings introduced by mfd changes Andres Salomon
2011-03-02 10:34     ` Samuel Ortiz

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=20110301105322.48754094@debxo \
    --to=dilinger@queued.net \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=sfr@canb.auug.org.au \
    /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).