From 97293de977365fe672daec2523e66ef457104921 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 23 Jun 2016 13:34:26 +0200 Subject: tty: vt, consw->con_scrolldelta cleanup * allow NULL consw->con_scrolldelta (some consoles define an empty hook) * => remove empty hooks now * return value of consw->con_scrolldelta is never checked => make the function void * document consw->con_scrolldelta a bit Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer Cc: linux-usb@vger.kernel.org Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/sisusbvga/sisusb_con.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'drivers/usb/misc/sisusbvga') diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index 0ebbf49cd649..a8244ebeb7a7 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -717,24 +717,22 @@ sisusbcon_blank(struct vc_data *c, int blank, int mode_switch) } /* interface routine */ -static int +static void sisusbcon_scrolldelta(struct vc_data *c, int lines) { struct sisusb_usb_data *sisusb; int margin = c->vc_size_row * 4; int ul, we, p, st; - /* The return value does not seem to be used */ - sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); if (!sisusb) - return 0; + return; /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb)) { mutex_unlock(&sisusb->lock); - return 0; + return; } if (!lines) /* Turn scrollback off */ @@ -774,8 +772,6 @@ sisusbcon_scrolldelta(struct vc_data *c, int lines) sisusbcon_set_start_address(sisusb, c); mutex_unlock(&sisusb->lock); - - return 1; } /* Interface routine */ @@ -1433,7 +1429,6 @@ static const struct consw sisusb_dummy_con = { .con_font_default = SISUSBCONDUMMY, .con_font_copy = SISUSBCONDUMMY, .con_set_palette = SISUSBCONDUMMY, - .con_scrolldelta = SISUSBCONDUMMY, }; int -- cgit v1.2.3-70-g09d2