Skip to content

Commit

Permalink
staging: sm7xxfb: delete unnecessary color map allocation
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Javier M. Mellid authored and Greg Kroah-Hartman committed Jun 26, 2012
1 parent 50b238b commit 128e861
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/staging/sm7xxfb/sm7xxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,14 @@ static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *pdev, char *name)
return sfb;
}

/*
* free struct smtcfb_info
*/
static void smtc_free_fb_info(struct smtcfb_info *sfb)
{
kfree(sfb);
}

/*
* Unmap in the memory mapped IO registers
*/
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 128e861

Please sign in to comment.