mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Javier M. Mellid" <jmunhoz@igalia.com>
To: gregkh@linuxfoundation.org, gewang@siliconmotion.com,
	boyod.yang@siliconmotion.com.cn
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	"Javier M. Mellid" <jmunhoz@igalia.com>
Subject: [PATCH 3/4] staging: sm7xxfb: delete unnecessary color map allocation
Date: Tue, 26 Jun 2012 06:00:16 +0200	[thread overview]
Message-ID: <1340683217-7986-4-git-send-email-jmunhoz@igalia.com> (raw)
In-Reply-To: <1340683217-7986-1-git-send-email-jmunhoz@igalia.com>

From: "Javier M. Mellid" <jmunhoz@igalia.com>

This patchs erases fb_alloc_cmap call in smtc_free_fb_info. In the
future, when needed, the required function to call here should be
fb_dealloc_cmap.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
---
 drivers/staging/sm7xxfb/sm7xxfb.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 4ab149b..40e8e0d 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -697,6 +697,14 @@ static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *pdev, char *name)
 }
 
 /*
+ * free struct smtcfb_info
+ */
+static void smtc_free_fb_info(struct smtcfb_info *sfb)
+{
+	kfree(sfb);
+}
+
+/*
  * Unmap in the memory mapped IO registers
  */
 
@@ -755,14 +763,6 @@ static inline void sm7xx_init_hw(void)
 	outb_p(0x11, 0x3c5);
 }
 
-static void smtc_free_fb_info(struct smtcfb_info *sfb)
-{
-	if (sfb) {
-		fb_alloc_cmap(&sfb->fb.cmap, 0, 0);
-		kfree(sfb);
-	}
-}
-
 /*
  *	sm712vga_setup - process command line options, get vga parameter
  *	@options: string of options
-- 
1.7.10


  parent reply	other threads:[~2012-06-26  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  4:00 [PATCH 0/4] staging: sm7xxfb: code improvements and cleanup Javier M. Mellid
2012-06-26  4:00 ` [PATCH 1/4] staging: sm7xxfb: dead code removal Javier M. Mellid
2012-06-26  4:00 ` [PATCH 2/4] " Javier M. Mellid
2012-06-26  4:00 ` Javier M. Mellid [this message]
2012-06-26  4:00 ` [PATCH 4/4] staging: sm7xxfb: code cleanup on smtcfb_setmode Javier M. Mellid

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=1340683217-7986-4-git-send-email-jmunhoz@igalia.com \
    --to=jmunhoz@igalia.com \
    --cc=boyod.yang@siliconmotion.com.cn \
    --cc=devel@driverdev.osuosl.org \
    --cc=gewang@siliconmotion.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®