+ vt-binding-make-newport_con-support-binding-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     newport_con: Fix resource acquisition

has been added to the -mm tree.  Its filename is

     vt-binding-make-newport_con-support-binding-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: newport_con: Fix resource acquisition
From: "Antonino A. Daplas" <adaplas@xxxxxxxxx>


newport_con can be compiled statically and assigned directly to conswitchp,
or it can be compiled as a module, in which case, it goes through the
take_over_console() pathway.

In the former, resource acquisition is done in newport_startup() and in the
latter, the resources are acquired in newport_console_init().

Fix so resources are properly acquired whatever pathway it goes through.

Signed-off-by: Antonino Daplas <adaplas@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/video/console/newport_con.c |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff -puN drivers/video/console/newport_con.c~vt-binding-make-newport_con-support-binding-fix drivers/video/console/newport_con.c
--- a/drivers/video/console/newport_con.c~vt-binding-make-newport_con-support-binding-fix
+++ a/drivers/video/console/newport_con.c
@@ -298,6 +298,12 @@ static const char *newport_startup(void)
 {
 	int i;
 
+	if (!sgi_gfxaddr)
+		return NULL;
+
+	if (!npregs)
+		npregs = (struct newport_regs *)/* ioremap cannot fail */
+			ioremap(sgi_gfxaddr, sizeof(struct newport_regs));
 	npregs->cset.config = NPORT_CFG_GD0;
 
 	if (newport_wait(npregs))
@@ -730,19 +736,21 @@ const struct consw newport_con = {
 	.con_save_screen  = DUMMY
 };
 
+#ifdef MODULE
 static int __init newport_console_init(void)
 {
 
 	if (!sgi_gfxaddr)
 		return NULL;
-	npregs = (struct newport_regs *)	/* ioremap cannot fail */
-		 ioremap(sgi_gfxaddr, sizeof(struct newport_regs));
+
+	if (!npregs)
+		npregs = (struct newport_regs *)/* ioremap cannot fail */
+			ioremap(sgi_gfxaddr, sizeof(struct newport_regs));
 
 	return take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1);
 }
 module_init(newport_console_init);
 
-#ifdef MODULE
 static void __exit newport_console_exit(void)
 {
 	give_up_console(&newport_con);
_

Patches currently in -mm which might be from adaplas@xxxxxxxxx are

origin.patch
savagefb-allocate-space-for-current-and-saved-register.patch
savagefb-add-state-save-and_restore-hooks.patch
savagefb-add-state-save-and_restore-hooks-fix.patch
fbdev-more-accurate-sync-range-extrapolation.patch
nvidiafb-revise-pci_device_id-table.patch
atyfb-fix-hardware-cursor-handling.patch
atyfb-remove-unneeded-calls-to-wait_for_idle.patch
atyfb-set-correct-acceleration-flags.patch
epson1355fb-update-platform-code.patch
vesafb-update-platform-code.patch
vfb-update-platform-code.patch
vga16fb-update-platform-code.patch
fbdev-static-pseudocolor-with-depth-less-than-4-does.patch
savagefb-whitespace-cleanup.patch
fbdev-firmware-edid-fixes.patch
nvidiafb-add-support-for-geforce-6100-and-related-chipsets.patch
vesafb-fix-return-code-of-vesafb_setcolreg.patch
vesafb-prefer-vga-registers-over-pmi.patch
atyfb-fix-dead-code.patch
fbdev-coverity-bug-85.patch
fbdev-coverity-bug-90.patch
backlight-fix-kconfig-dependency.patch
fbdev-fix-logo-rotation-if-width-=-height.patch
macmodes-fix-section-warning.patch
atyfb-fix-section-warnings.patch
detaching-fbcon-fix-vgacon-to-allow-retaking-of-the.patch
detaching-fbcon-fix-give_up_console.patch
detaching-fbcon-remove-calls-to-pci_disable_device.patch
detaching-fbcon-add-sysfs-class-device-entry-for-fbcon.patch
detaching-fbcon-clean-up-exit-code.patch
detaching-fbcon-add-capability-to-attach-detach-fbcon.patch
detaching-fbcon-update-documentation.patch
vt-binding-add-binding-unbinding-support-for-the-vt.patch
vt-binding-update-fbcon-to-support-binding.patch
vt-binding-update-fbcon-to-support-binding-fix-module-ref-counting.patch
vt-binding-fbcon-update-documentation.patch
vt-binding-add-new-doc-file-describing-the-feature.patch
vt-binding-add-sysfs-control-to-the-vt-layer.patch
vt-binding-add-sysfs-control-to-the-vt-layer-fix-module-ref-counting.patch
vt-binding-make-vt-binding-a-kconfig-option.patch
vt-binding-do-not-create-a-device-file-for-class-device.patch
vt-binding-update-documentation.patch
vt-binding-update-documentation-fix.patch
vt-binding-make-mdacon-support-binding.patch
vt-binding-make-newport_con-support-binding.patch
vt-binding-make-newport_con-support-binding-fix.patch
vt-binding-make-promcon-support-binding.patch
vt-binding-make-sticon-support-binding.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux