tty: vt: make consw::con_font_default()'s name const
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 22 Jan 2024 11:03:51 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 02:08:54 +0000 (18:08 -0800)
It's a name after all and that is not supposed to be changed. So make it
const to make this obvious.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-parisc@vger.kernel.org
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-38-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/console/newport_con.c
drivers/video/console/sticon.c
drivers/video/fbdev/core/fbcon.c
include/linux/console.h

index 4203bd5fd0a110a4958685e09b26bb2060e7fcf2..a51cfc1d560e7af172b30da70b1f06668b5e48b1 100644 (file)
@@ -564,7 +564,8 @@ static int newport_set_def_font(int unit, struct console_font *op)
        return 0;
 }
 
-static int newport_font_default(struct vc_data *vc, struct console_font *op, char *name)
+static int newport_font_default(struct vc_data *vc, struct console_font *op,
+                               const char *name)
 {
        return newport_set_def_font(vc->vc_num, op);
 }
index 710201fb8ce4119257260de1a55387187bf978fe..4c7b4959a1aab7cb46ebca80c1bba3e0d7b8d911 100644 (file)
@@ -246,7 +246,8 @@ static int sticon_set_font(struct vc_data *vc, const struct console_font *op,
        return 0;
 }
 
-static int sticon_font_default(struct vc_data *vc, struct console_font *op, char *name)
+static int sticon_font_default(struct vc_data *vc, struct console_font *op,
+                              const char *name)
 {
        sticon_set_def_font(vc->vc_num);
 
index 62474630c4d485d999bc29f3066223119be91099..657160eec0a52048b6e29ee5ff2a2296acd77071 100644 (file)
@@ -2533,7 +2533,8 @@ static int fbcon_set_font(struct vc_data *vc, const struct console_font *font,
        return fbcon_do_set_font(vc, font->width, font->height, charcount, new_data, 1);
 }
 
-static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font, char *name)
+static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font,
+                             const char *name)
 {
        struct fb_info *info = fbcon_info_from_console(vc->vc_num);
        const struct font_desc *f;
index 0a9f4cbdde83fe1510974d171c61c1fc5b68593f..6bb7e5e37ae4a81122e052ec3b21eed001ec298a 100644 (file)
@@ -81,7 +81,7 @@ struct consw {
        int     (*con_font_get)(struct vc_data *vc, struct console_font *font,
                        unsigned int vpitch);
        int     (*con_font_default)(struct vc_data *vc,
-                       struct console_font *font, char *name);
+                       struct console_font *font, const char *name);
        int     (*con_resize)(struct vc_data *vc, unsigned int width,
                              unsigned int height, bool from_user);
        void    (*con_set_palette)(struct vc_data *vc,