Commit 5c6e6c72 authored by Chris Wilson's avatar Chris Wilson Committed by Linus Torvalds

[PATCH] Kernel Janitors patch to drivers_macintosh_ans-lcd.c

  Working on the Linux Kernel Janitors project, and following up on Mikal
  Still's work there, I'd like to submit a patch for the Macintosh ANS
  LCD driver.

  I believe from Mikal's Patches page that his previous patch was rejected
  due to not cleaning up properly. I believe my patch addresses this issue,
  by calling iounmap() to free the IO remapping created by ioremap() earlier
  in the function, if the call to misc_register() fails for any reason.

  Unfortunately I don't know how to get this driver to compile on my
  machine, and therefore I can't even check that my patch compiles. If you
  can advise me how to set my machine up to dompile these drivers, then
  please get in touch =) I hope I didn't make any stupid mistakes in this
  patch either.
parent 367635e2
......@@ -140,6 +140,7 @@ int __init
anslcd_init(void)
{
int a;
int retval;
struct device_node* node;
node = find_devices("lcd");
......@@ -150,7 +151,12 @@ anslcd_init(void)
anslcd_ptr = (volatile unsigned char*)ioremap(ANSLCD_ADDR, 0x20);
misc_register(&anslcd_dev);
retval = misc_register(&anslcd_dev);
if(retval < 0){
printk(KERN_INFO "LCD: misc_register failed\n");
iounmap(anslcd_ptr);
return retval;
}
#ifdef DEBUG
printk(KERN_DEBUG "LCD: init\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment