Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70718
b: refs/heads/master
c: f4a1c2b
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Machek authored and Linus Torvalds committed Oct 17, 2007
1 parent cf26490 commit 45b66c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4749252776712e587c7c7619cbf0342b080c7f44
refs/heads/master: f4a1c2bce002f683801bcdbbc9fd89804614fb6b
17 changes: 8 additions & 9 deletions trunk/drivers/char/lp.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static unsigned int lp_count = 0;
static struct class *lp_class;

#ifdef CONFIG_LP_CONSOLE
static struct parport *console_registered; // initially NULL
static struct parport *console_registered;
#endif /* CONFIG_LP_CONSOLE */

#undef LP_DEBUG
Expand Down Expand Up @@ -749,19 +749,19 @@ static struct console lpcons = {
/* --- initialisation code ------------------------------------- */

static int parport_nr[LP_NO] = { [0 ... LP_NO-1] = LP_PARPORT_UNSPEC };
static char *parport[LP_NO] = { NULL, };
static int reset = 0;
static char *parport[LP_NO];
static int reset;

module_param_array(parport, charp, NULL, 0);
module_param(reset, bool, 0);

#ifndef MODULE
static int __init lp_setup (char *str)
{
static int parport_ptr; // initially zero
static int parport_ptr;
int x;

if (get_option (&str, &x)) {
if (get_option(&str, &x)) {
if (x == 0) {
/* disable driver on "lp=" or "lp=0" */
parport_nr[0] = LP_PARPORT_OFF;
Expand Down Expand Up @@ -807,7 +807,7 @@ static int lp_register(int nr, struct parport *port)
#ifdef CONFIG_LP_CONSOLE
if (!nr) {
if (port->modes & PARPORT_MODE_SAFEININT) {
register_console (&lpcons);
register_console(&lpcons);
console_registered = port;
printk (KERN_INFO "lp%d: console ready\n", CONSOLE_LP);
} else
Expand All @@ -823,8 +823,7 @@ static void lp_attach (struct parport *port)
{
unsigned int i;

switch (parport_nr[0])
{
switch (parport_nr[0]) {
case LP_PARPORT_UNSPEC:
case LP_PARPORT_AUTO:
if (parport_nr[0] == LP_PARPORT_AUTO &&
Expand Down Expand Up @@ -855,7 +854,7 @@ static void lp_detach (struct parport *port)
/* Write this some day. */
#ifdef CONFIG_LP_CONSOLE
if (console_registered == port) {
unregister_console (&lpcons);
unregister_console(&lpcons);
console_registered = NULL;
}
#endif /* CONFIG_LP_CONSOLE */
Expand Down

0 comments on commit 45b66c2

Please sign in to comment.