History

console: Delete unused con_font_copy() callback implementations

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").

Peilin Ye committed 6 years ago

Commit 7a089ec1 parent 5bc5cc25 files · +1 −25Browse files

Unified · Split

5 files
  1. drivers/usb/misc/sisusbvga/sisusb_con.c +0 −6
  2. drivers/video/console/dummycon.c +0 −6
  3. drivers/video/fbdev/core/fbcon.c +0 −11
  4. include/linux/console.h +0 −1
  5. include/uapi/linux/kd.h +1 −1
drivers/usb/misc/sisusbvga/sisusb_con.c+0−6
@@ -1358,11 +1358,6 @@ static int sisusbdummycon_font_default(struct vc_data *vc, · 1357 unmodified lines
1358 return 0;1358 return 0;
1359}1359}
1360 1360
1361static int sisusbdummycon_font_copy(struct vc_data *vc, int con)
1362{
1363 return 0;
1364}
1365
1366static const struct consw sisusb_dummy_con = {1361static const struct consw sisusb_dummy_con = {
1367 .owner = THIS_MODULE,1362 .owner = THIS_MODULE,
1368 .con_startup = sisusbdummycon_startup,1363 .con_startup = sisusbdummycon_startup,
@@ -1377,7 +1372,6 @@ static const struct consw sisusb_dummy_con = { · 8 unmodified lines
1377 .con_blank = sisusbdummycon_blank,1372 .con_blank = sisusbdummycon_blank,
1378 .con_font_set = sisusbdummycon_font_set,1373 .con_font_set = sisusbdummycon_font_set,
1379 .con_font_default = sisusbdummycon_font_default,1374 .con_font_default = sisusbdummycon_font_default,
1380 .con_font_copy = sisusbdummycon_font_copy,
1381};1375};
1382 1376
1383int1377int
drivers/video/console/dummycon.c+0−6
@@ -136,11 +136,6 @@ static int dummycon_font_default(struct vc_data *vc, · 135 unmodified lines
136 return 0;136 return 0;
137}137}
138 138
139static int dummycon_font_copy(struct vc_data *vc, int con)
140{
141 return 0;
142}
143
144/*139/*
145 * The console `switch' structure for the dummy console140 * The console `switch' structure for the dummy console
146 *141 *
@@ -161,6 +156,5 @@ const struct consw dummy_con = { · 14 unmodified lines
161 .con_blank = dummycon_blank,156 .con_blank = dummycon_blank,
162 .con_font_set = dummycon_font_set,157 .con_font_set = dummycon_font_set,
163 .con_font_default = dummycon_font_default,158 .con_font_default = dummycon_font_default,
164 .con_font_copy = dummycon_font_copy,
165};159};
166EXPORT_SYMBOL_GPL(dummy_con);160EXPORT_SYMBOL_GPL(dummy_con);
drivers/video/fbdev/core/fbcon.c+0−11
@@ -2451,16 +2451,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, · 2450 unmodified lines
2451 return 0;2451 return 0;
2452}2452}
2453 2453
2454static int fbcon_copy_font(struct vc_data *vc, int con)
2455{
2456 struct fbcon_display *od = &fb_display[con];
2457 struct console_font *f = &vc->vc_font;
2458
2459 if (od->fontdata == f->data)
2460 return 0; /* already the same font... */
2461 return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont);
2462}
2463
2464/*2454/*
2465 * User asked to set font; we are guaranteed that2455 * User asked to set font; we are guaranteed that
2466 * a) width and height are in range 1..322456 * a) width and height are in range 1..32
@@ -3111,7 +3101,6 @@ static const struct consw fb_con = { · 644 unmodified lines
3111 .con_font_set = fbcon_set_font,3101 .con_font_set = fbcon_set_font,
3112 .con_font_get = fbcon_get_font,3102 .con_font_get = fbcon_get_font,
3113 .con_font_default = fbcon_set_def_font,3103 .con_font_default = fbcon_set_def_font,
3114 .con_font_copy = fbcon_copy_font,
3115 .con_set_palette = fbcon_set_palette,3104 .con_set_palette = fbcon_set_palette,
3116 .con_invert_region = fbcon_invert_region,3105 .con_invert_region = fbcon_invert_region,
3117 .con_screen_pos = fbcon_screen_pos,3106 .con_screen_pos = fbcon_screen_pos,
include/linux/console.h+0−1
@@ -62,7 +62,6 @@ struct consw { · 61 unmodified lines
62 int (*con_font_get)(struct vc_data *vc, struct console_font *font);62 int (*con_font_get)(struct vc_data *vc, struct console_font *font);
63 int (*con_font_default)(struct vc_data *vc,63 int (*con_font_default)(struct vc_data *vc,
64 struct console_font *font, char *name);64 struct console_font *font, char *name);
65 int (*con_font_copy)(struct vc_data *vc, int con);
66 int (*con_resize)(struct vc_data *vc, unsigned int width,65 int (*con_resize)(struct vc_data *vc, unsigned int width,
67 unsigned int height, unsigned int user);66 unsigned int height, unsigned int user);
68 void (*con_set_palette)(struct vc_data *vc,67 void (*con_set_palette)(struct vc_data *vc,
include/uapi/linux/kd.h+1−1
@@ -173,7 +173,7 @@ struct console_font { · 172 unmodified lines
173#define KD_FONT_OP_SET 0 /* Set font */173#define KD_FONT_OP_SET 0 /* Set font */
174#define KD_FONT_OP_GET 1 /* Get font */174#define KD_FONT_OP_GET 1 /* Get font */
175#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */175#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */
176#define KD_FONT_OP_COPY 3 /* Copy from another console */176#define KD_FONT_OP_COPY 3 /* Obsolete, do not use */
177 177
178#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */178#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */
179 179