OSDN Git Service

console: Delete unused con_font_copy() callback implementations
authorPeilin Ye <yepeilin.cs@gmail.com>
Thu, 12 Nov 2020 12:04:03 +0000 (07:04 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 16 Nov 2020 15:27:03 +0000 (16:27 +0100)
Recently in commit 3c4e0dff2095 ("vt: Disable KD_FONT_OP_COPY") we
disabled the KD_FONT_OP_COPY ioctl() option. Delete all the
con_font_copy() callbacks, since we no longer use them.

Mark KD_FONT_OP_COPY as "obsolete" in include/uapi/linux/kd.h, just like
what we have done for PPPIOCDETACH in commit af8d3c7c001a ("ppp: remove
the PPPIOCDETACH ioctl").

Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/c8d28007edf50de4387e1532eb3eb736db716f73.1605169912.git.yepeilin.cs@gmail.com
drivers/usb/misc/sisusbvga/sisusb_con.c
drivers/video/console/dummycon.c
drivers/video/fbdev/core/fbcon.c
include/linux/console.h
include/uapi/linux/kd.h

index c63e545..fd99543 100644 (file)
@@ -1358,11 +1358,6 @@ static int sisusbdummycon_font_default(struct vc_data *vc,
        return 0;
 }
 
-static int sisusbdummycon_font_copy(struct vc_data *vc, int con)
-{
-       return 0;
-}
-
 static const struct consw sisusb_dummy_con = {
        .owner =                THIS_MODULE,
        .con_startup =          sisusbdummycon_startup,
@@ -1377,7 +1372,6 @@ static const struct consw sisusb_dummy_con = {
        .con_blank =            sisusbdummycon_blank,
        .con_font_set =         sisusbdummycon_font_set,
        .con_font_default =     sisusbdummycon_font_default,
-       .con_font_copy =        sisusbdummycon_font_copy,
 };
 
 int
index 2a0d0bd..ab3df75 100644 (file)
@@ -136,11 +136,6 @@ static int dummycon_font_default(struct vc_data *vc,
        return 0;
 }
 
-static int dummycon_font_copy(struct vc_data *vc, int con)
-{
-       return 0;
-}
-
 /*
  *  The console `switch' structure for the dummy console
  *
@@ -161,6 +156,5 @@ const struct consw dummy_con = {
        .con_blank =    dummycon_blank,
        .con_font_set = dummycon_font_set,
        .con_font_default =     dummycon_font_default,
-       .con_font_copy =        dummycon_font_copy,
 };
 EXPORT_SYMBOL_GPL(dummy_con);
index cef4378..26d1b09 100644 (file)
@@ -2451,16 +2451,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
        return 0;
 }
 
-static int fbcon_copy_font(struct vc_data *vc, int con)
-{
-       struct fbcon_display *od = &fb_display[con];
-       struct console_font *f = &vc->vc_font;
-
-       if (od->fontdata == f->data)
-               return 0;       /* already the same font... */
-       return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont);
-}
-
 /*
  *  User asked to set font; we are guaranteed that
  *     a) width and height are in range 1..32
@@ -3111,7 +3101,6 @@ static const struct consw fb_con = {
        .con_font_set           = fbcon_set_font,
        .con_font_get           = fbcon_get_font,
        .con_font_default       = fbcon_set_def_font,
-       .con_font_copy          = fbcon_copy_font,
        .con_set_palette        = fbcon_set_palette,
        .con_invert_region      = fbcon_invert_region,
        .con_screen_pos         = fbcon_screen_pos,
index 4b1e26c..20874db 100644 (file)
@@ -62,7 +62,6 @@ struct consw {
        int     (*con_font_get)(struct vc_data *vc, struct console_font *font);
        int     (*con_font_default)(struct vc_data *vc,
                        struct console_font *font, char *name);
-       int     (*con_font_copy)(struct vc_data *vc, int con);
        int     (*con_resize)(struct vc_data *vc, unsigned int width,
                        unsigned int height, unsigned int user);
        void    (*con_set_palette)(struct vc_data *vc,
index 4616b31..ee929ec 100644 (file)
@@ -173,7 +173,7 @@ struct console_font {
 #define KD_FONT_OP_SET         0       /* Set font */
 #define KD_FONT_OP_GET         1       /* Get font */
 #define KD_FONT_OP_SET_DEFAULT 2       /* Set font to default, data points to name / NULL */
-#define KD_FONT_OP_COPY                3       /* Copy from another console */
+#define KD_FONT_OP_COPY                3       /* Obsolete, do not use */
 
 #define KD_FONT_FLAG_DONT_RECALC       1       /* Don't recalculate hw charcell size [compat] */