auxdisplay: ks0108: initialize local parport variable
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 13 Aug 2015 13:36:05 +0000 (19:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 00:27:17 +0000 (17:27 -0700)
The local variable ks0108_parport is used by other functions to write to
the parallel port. We missed initializing it when we converted the
driver to use new Parallel Port codes.

Fixes: 4edd70c133f3 ("auxdisplay: ks0108: use new parport device model")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/auxdisplay/ks0108.c

index 4c471bd8c2f726df6e85c07fb9fc2a0af894ae3a..816de9eaac2643c23722c89842b47373969fc2bf 100644 (file)
@@ -146,6 +146,7 @@ static void ks0108_parport_attach(struct parport *port)
                goto err_unreg_device;
        }
 
+       ks0108_parport = port;
        ks0108_inited = 1;
        return;
 
@@ -167,6 +168,7 @@ static void ks0108_parport_detach(struct parport *port)
        parport_release(ks0108_pardevice);
        parport_unregister_device(ks0108_pardevice);
        ks0108_pardevice = NULL;
+       ks0108_parport = NULL;
 }
 
 /*