From 3dc59489fda386bd3fedbb1787ee08619afd5aee Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 12 Jun 2024 15:41:17 +0200 Subject: [PATCH 01/21] video/logo: Make logo data const again As gcc-4.1 is no longer supported, the logo data can be made const again. Hence revert commit 15e3252464432a29 ("fbdev: work around old compiler bug"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/logo/pnmtologo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/logo/pnmtologo.c b/drivers/video/logo/pnmtologo.c index 8080c4d9c4a2..28d9f0b907a9 100644 --- a/drivers/video/logo/pnmtologo.c +++ b/drivers/video/logo/pnmtologo.c @@ -238,7 +238,7 @@ static void write_header(void) fprintf(out, " * Linux logo %s\n", logoname); fputs(" */\n\n", out); fputs("#include \n\n", out); - fprintf(out, "static unsigned char %s_data[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_data[] __initconst = {\n", logoname); } @@ -375,7 +375,7 @@ static void write_logo_clut224(void) fputs("\n};\n\n", out); /* write logo clut */ - fprintf(out, "static unsigned char %s_clut[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_clut[] __initconst = {\n", logoname); write_hex_cnt = 0; for (i = 0; i < logo_clutsize; i++) { From d6161b7d8b33aa8756ab2f7eed8cb371c2e7e8ed Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 12 Jun 2024 15:42:29 +0200 Subject: [PATCH 02/21] video/logo: Remove linux_serial_image comments The last user of the serial_console ASCII image was removed in v2.1.115. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- include/linux/linux_logo.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h index d4d5b93efe84..e37699b7e839 100644 --- a/include/linux/linux_logo.h +++ b/include/linux/linux_logo.h @@ -10,9 +10,6 @@ * Copyright (C) 2001 Greg Banks * Copyright (C) 2001 Jan-Benedict Glaw * Copyright (C) 2003 Geert Uytterhoeven - * - * Serial_console ascii image can be any size, - * but should contain %s to display the version */ #include From f709f1cf65aca8e5379ca23b0faa52be6839fa75 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 12 Jun 2024 08:32:22 -0700 Subject: [PATCH 03/21] fbdev: matroxfb: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_accel.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_DAC1064.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_Ti3026.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/matrox/matroxfb_DAC1064.c | 1 + drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 1 + drivers/video/fbdev/matrox/matroxfb_accel.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c index 765e805d14e3..398b7035f5a9 100644 --- a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c +++ b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c @@ -1111,4 +1111,5 @@ EXPORT_SYMBOL(matrox_G100); EXPORT_SYMBOL(DAC1064_global_init); EXPORT_SYMBOL(DAC1064_global_restore); #endif +MODULE_DESCRIPTION("Matrox Mystique/G100 output driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c index 5617c014da87..f53b8066e8a5 100644 --- a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c +++ b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c @@ -746,4 +746,5 @@ struct matrox_switch matrox_millennium = { }; EXPORT_SYMBOL(matrox_millennium); #endif +MODULE_DESCRIPTION("Matrox Millennium output driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/video/fbdev/matrox/matroxfb_accel.c b/drivers/video/fbdev/matrox/matroxfb_accel.c index ce51227798a1..52e15dc6f45b 100644 --- a/drivers/video/fbdev/matrox/matroxfb_accel.c +++ b/drivers/video/fbdev/matrox/matroxfb_accel.c @@ -517,4 +517,5 @@ static void matroxfb_imageblit(struct fb_info* info, const struct fb_image* imag } } +MODULE_DESCRIPTION("Accelerated fbops for Matrox Millennium/Mystique/G100/G200/G400/G450/G550"); MODULE_LICENSE("GPL"); From 7cf51220bc6a163a41e43b7bfff35e081765ce47 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 12 Jun 2024 08:50:53 -0700 Subject: [PATCH 04/21] fbdev: viafb: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/via/viafb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/via/viafbdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c index a52b1ba43a48..6da5ae7d229a 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c @@ -2144,5 +2144,6 @@ MODULE_PARM_DESC(viafb_lcd_port, "Specify LCD output port."); module_param(viafb_dvi_port, charp, S_IRUSR); MODULE_PARM_DESC(viafb_dvi_port, "Specify DVI output port."); +MODULE_DESCRIPTION("VIA UniChrome (Pro) and Chrome9 display driver"); MODULE_LICENSE("GPL"); #endif From b4bc18a0a6ba7a3ee83277c5b0705cb87ba10b52 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 12 Jun 2024 10:10:40 -0700 Subject: [PATCH 05/21] fbdev: kyro: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/kyro/kyrofb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/kyro/fbdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c index af6c0581d3e2..08ee8baa79f8 100644 --- a/drivers/video/fbdev/kyro/fbdev.c +++ b/drivers/video/fbdev/kyro/fbdev.c @@ -811,4 +811,5 @@ module_exit(kyrofb_exit); #endif MODULE_AUTHOR("STMicroelectronics; Paul Mundt "); +MODULE_DESCRIPTION("STG4000/Kyro/PowerVR 3 driver"); MODULE_LICENSE("GPL"); From e4d52c0ea3ded15ee0634f6679629a620ebf35d2 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 12 Jun 2024 15:01:11 -0700 Subject: [PATCH 06/21] fbdev: goldfishfb: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/goldfishfb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/goldfishfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c index ca9e8255947c..5f8de1ec23c3 100644 --- a/drivers/video/fbdev/goldfishfb.c +++ b/drivers/video/fbdev/goldfishfb.c @@ -321,4 +321,5 @@ static struct platform_driver goldfish_fb_driver = { module_platform_driver(goldfish_fb_driver); +MODULE_DESCRIPTION("Goldfish Virtual Platform Framebuffer driver"); MODULE_LICENSE("GPL v2"); From 47856a63fd6a56099abba53655a73880d9fbdf7a Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 12 Jun 2024 18:59:53 -0700 Subject: [PATCH 07/21] fbdev: macmodes: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/macmodes.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/macmodes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/macmodes.c b/drivers/video/fbdev/macmodes.c index af86c081d2be..d6be3c67d3df 100644 --- a/drivers/video/fbdev/macmodes.c +++ b/drivers/video/fbdev/macmodes.c @@ -411,4 +411,5 @@ int mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info, } EXPORT_SYMBOL(mac_find_mode); +MODULE_DESCRIPTION("MacOS video mode library"); MODULE_LICENSE("GPL"); From 7606e60522a63a9e78bc779bbd4c7e1c7f1e984b Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 12 Jun 2024 19:44:37 -0700 Subject: [PATCH 08/21] fbdev: vfb: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/vfb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/vfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/vfb.c b/drivers/video/fbdev/vfb.c index f86149ba3835..158e48385c24 100644 --- a/drivers/video/fbdev/vfb.c +++ b/drivers/video/fbdev/vfb.c @@ -546,5 +546,6 @@ static void __exit vfb_exit(void) module_exit(vfb_exit); +MODULE_DESCRIPTION("Virtual Frame Buffer driver"); MODULE_LICENSE("GPL"); #endif /* MODULE */ From 15be78e0c3d5faffd69e9dfe55f20d5125b8f6ee Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 14 Jun 2024 23:25:00 -0700 Subject: [PATCH 09/21] fbdev: offb: add missing MODULE_DESCRIPTION() macro With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/offb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/fbdev/offb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c index ea38a260774b..e8ff33894603 100644 --- a/drivers/video/fbdev/offb.c +++ b/drivers/video/fbdev/offb.c @@ -717,4 +717,5 @@ static void __exit offb_exit(void) } module_exit(offb_exit); +MODULE_DESCRIPTION("Open Firmware frame buffer device driver"); MODULE_LICENSE("GPL"); From 175ee8f196d7b057520ed6893217a42e3d121234 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 17 Jun 2024 00:59:33 +0000 Subject: [PATCH 10/21] fbdev: omapdss: use for_each_endpoint_of_node() We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Signed-off-by: Helge Deller --- drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c index 09f719af0d0c..d80720c84323 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c @@ -149,8 +149,7 @@ static void __init omapdss_walk_device(struct device_node *node, bool root) of_node_put(n); - n = NULL; - while ((n = of_graph_get_next_endpoint(node, n)) != NULL) { + for_each_endpoint_of_node(node, n) { struct device_node *pn; pn = of_graph_get_remote_port_parent(n); From b03c3519498ce1c96a4e2fe10f200cdeda3c3500 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 17 Jun 2024 00:59:39 +0000 Subject: [PATCH 11/21] fbdev: omapfb: use of_graph_get_remote_port() We already have of_graph_get_remote_port(), Let's use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Signed-off-by: Helge Deller --- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index 14965a3fd05b..4040e247e026 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -117,19 +117,6 @@ u32 dss_of_port_get_port_number(struct device_node *port) return reg; } -static struct device_node *omapdss_of_get_remote_port(const struct device_node *node) -{ - struct device_node *np; - - np = of_graph_get_remote_endpoint(node); - if (!np) - return NULL; - - np = of_get_next_parent(np); - - return np; -} - struct omap_dss_device * omapdss_of_find_source_for_first_ep(struct device_node *node) { @@ -141,7 +128,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) if (!ep) return ERR_PTR(-EINVAL); - src_port = omapdss_of_get_remote_port(ep); + src_port = of_graph_get_remote_port(ep); if (!src_port) { of_node_put(ep); return ERR_PTR(-EINVAL); From c2bc958b2b03e361f14df99983bc64a39a7323a3 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Mon, 17 Jun 2024 13:06:27 +0200 Subject: [PATCH 12/21] fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes Test the vesa_attributes field in struct screen_info for compatibility with VGA hardware. Vesafb currently tests bit 1 in screen_info's capabilities field which indicates a 64-bit lfb address and is unrelated to VGA compatibility. Section 4.4 of the Vesa VBE 2.0 specifications defines that bit 5 in the mode's attributes field signals VGA compatibility. The mode is compatible with VGA hardware if the bit is clear. In that case, the driver can access VGA state of the VBE's underlying hardware. The vesafb driver uses this feature to program the color LUT in palette modes. Without, colors might be incorrect. The problem got introduced in commit 89ec4c238e7a ("[PATCH] vesafb: Fix incorrect logo colors in x86_64"). It incorrectly stores the mode attributes in the screen_info's capabilities field and updates vesafb accordingly. Later, commit 5e8ddcbe8692 ("Video mode probing support for the new x86 setup code") fixed the screen_info, but did not update vesafb. Color output still tends to work, because bit 1 in capabilities is usually 0. Besides fixing the bug in vesafb, this commit introduces a helper that reads the correct bit from screen_info. Signed-off-by: Thomas Zimmermann Fixes: 5e8ddcbe8692 ("Video mode probing support for the new x86 setup code") Reviewed-by: Javier Martinez Canillas Cc: # v2.6.23+ Signed-off-by: Helge Deller --- drivers/video/fbdev/vesafb.c | 2 +- include/linux/screen_info.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c index 8ab64ae4cad3..5a161750a3ae 100644 --- a/drivers/video/fbdev/vesafb.c +++ b/drivers/video/fbdev/vesafb.c @@ -271,7 +271,7 @@ static int vesafb_probe(struct platform_device *dev) if (si->orig_video_isVGA != VIDEO_TYPE_VLFB) return -ENODEV; - vga_compat = (si->capabilities & 2) ? 0 : 1; + vga_compat = !__screen_info_vbe_mode_nonvga(si); vesafb_fix.smem_start = si->lfb_base; vesafb_defined.bits_per_pixel = si->lfb_depth; if (15 == vesafb_defined.bits_per_pixel) diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 75303c126285..6a4a3cec4638 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h @@ -49,6 +49,16 @@ static inline u64 __screen_info_lfb_size(const struct screen_info *si, unsigned return lfb_size; } +static inline bool __screen_info_vbe_mode_nonvga(const struct screen_info *si) +{ + /* + * VESA modes typically run on VGA hardware. Set bit 5 signals that this + * is not the case. Drivers can then not make use of VGA resources. See + * Sec 4.4 of the VBE 2.0 spec. + */ + return si->vesa_attributes & BIT(5); +} + static inline unsigned int __screen_info_video_type(unsigned int type) { switch (type) { From 24aa3eea5921330fcefa90b536b9db9f759d1faf Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 17 Jun 2024 20:05:34 -0700 Subject: [PATCH 13/21] fbdev: c2p_planar: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/c2p_planar.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/fbdev/c2p_planar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/c2p_planar.c b/drivers/video/fbdev/c2p_planar.c index ec7ac8526f06..22c8c1b6db60 100644 --- a/drivers/video/fbdev/c2p_planar.c +++ b/drivers/video/fbdev/c2p_planar.c @@ -153,4 +153,5 @@ void c2p_planar(void *dst, const void *src, u32 dx, u32 dy, u32 width, } EXPORT_SYMBOL_GPL(c2p_planar); +MODULE_DESCRIPTION("Fast C2P (Chunky-to-Planar) Conversion"); MODULE_LICENSE("GPL"); From 2d93937089be98713e27460e3d3a135668c8541b Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 17 Jun 2024 20:14:03 -0700 Subject: [PATCH 14/21] fbdev: amifb: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/amifb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/fbdev/amifb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c index 305f396c764c..132638240521 100644 --- a/drivers/video/fbdev/amifb.c +++ b/drivers/video/fbdev/amifb.c @@ -3782,5 +3782,6 @@ static struct platform_driver amifb_driver __refdata = { module_platform_driver_probe(amifb_driver, amifb_probe); +MODULE_DESCRIPTION("Amiga builtin chipset frame buffer driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:amiga-video"); From 3402302cb128ec5067d885343a54df97231ac06f Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 21 Jun 2024 23:07:06 -0700 Subject: [PATCH 15/21] video: console: add missing MODULE_DESCRIPTION() macros With ARCH=i386, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/console/mdacon.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes three other files which, although they did not produce a warning with the i386 allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/video/console/mdacon.c | 1 + drivers/video/console/newport_con.c | 1 + drivers/video/console/sticon.c | 1 + drivers/video/console/vgacon.c | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index c0e1f4554a44..d52cd99cd18b 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c @@ -561,5 +561,6 @@ static void __exit mda_console_exit(void) module_init(mda_console_init); module_exit(mda_console_exit); +MODULE_DESCRIPTION("MDA based console driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index a51cfc1d560e..242415366074 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -744,4 +744,5 @@ static struct gio_driver newport_driver = { }; module_driver(newport_driver, gio_register_driver, gio_unregister_driver); +MODULE_DESCRIPTION("SGI Newport console driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 4c7b4959a1aa..f1f3ee8e5e8a 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -391,4 +391,5 @@ static int __init sticonsole_init(void) } module_init(sticonsole_init); +MODULE_DESCRIPTION("HP STI console driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 7597f04b0dc7..37bd18730fe0 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1222,4 +1222,5 @@ void vgacon_register_screen(struct screen_info *si) vga_si = si; } +MODULE_DESCRIPTION("VGA based console driver"); MODULE_LICENSE("GPL"); From e4066d17b92ea7930fbef990912c49b07430a6e0 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 21 Jun 2024 22:14:29 -0700 Subject: [PATCH 16/21] video: agp: add remaining missing MODULE_DESCRIPTION() macros With ARCH=i386, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/ali-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/ati-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/amd-k7-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/efficeon-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/nvidia-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/sworks-agp.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes alpha-agp.c and parisc-agp.c which, although they did not produce a warning with the i386 allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller --- drivers/char/agp/ali-agp.c | 1 + drivers/char/agp/alpha-agp.c | 1 + drivers/char/agp/amd-k7-agp.c | 1 + drivers/char/agp/ati-agp.c | 1 + drivers/char/agp/efficeon-agp.c | 1 + drivers/char/agp/nvidia-agp.c | 1 + drivers/char/agp/parisc-agp.c | 1 + drivers/char/agp/sworks-agp.c | 1 + 8 files changed, 8 insertions(+) diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c index 760d9a931289..2eaab502ec29 100644 --- a/drivers/char/agp/ali-agp.c +++ b/drivers/char/agp/ali-agp.c @@ -418,5 +418,6 @@ module_init(agp_ali_init); module_exit(agp_ali_cleanup); MODULE_AUTHOR("Dave Jones"); +MODULE_DESCRIPTION("ALi AGPGART routines"); MODULE_LICENSE("GPL and additional rights"); diff --git a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c index f0d0c044731c..e1763ecb8111 100644 --- a/drivers/char/agp/alpha-agp.c +++ b/drivers/char/agp/alpha-agp.c @@ -217,4 +217,5 @@ module_init(agp_alpha_core_init); module_exit(agp_alpha_core_cleanup); MODULE_AUTHOR("Jeff Wiedemeier "); +MODULE_DESCRIPTION("Alpha AGP support"); MODULE_LICENSE("GPL and additional rights"); diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 55397ba765d2..795c8c9ff680 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c @@ -549,4 +549,5 @@ static void __exit agp_amdk7_cleanup(void) module_init(agp_amdk7_init); module_exit(agp_amdk7_cleanup); +MODULE_DESCRIPTION("AMD K7 AGPGART routines"); MODULE_LICENSE("GPL and additional rights"); diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index 3c1fce48aabe..f7871afe08cf 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c @@ -572,5 +572,6 @@ module_init(agp_ati_init); module_exit(agp_ati_cleanup); MODULE_AUTHOR("Dave Jones"); +MODULE_DESCRIPTION("ATi AGPGART routines"); MODULE_LICENSE("GPL and additional rights"); diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index f28d42319269..0d25bbdc7e6a 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c @@ -465,4 +465,5 @@ module_init(agp_efficeon_init); module_exit(agp_efficeon_cleanup); MODULE_AUTHOR("Carlos Puchol "); +MODULE_DESCRIPTION("Transmeta's Efficeon AGPGART driver"); MODULE_LICENSE("GPL and additional rights"); diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index dbcbc06cc202..e424360fb4a1 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c @@ -462,6 +462,7 @@ static void __exit agp_nvidia_cleanup(void) module_init(agp_nvidia_init); module_exit(agp_nvidia_cleanup); +MODULE_DESCRIPTION("Nvidia AGPGART routines"); MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("NVIDIA Corporation"); diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index edbc4d338117..93a48070b2a1 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c @@ -432,4 +432,5 @@ parisc_agp_init(void) module_init(parisc_agp_init); MODULE_AUTHOR("Kyle McMartin "); +MODULE_DESCRIPTION("HP Quicksilver AGP GART routines"); MODULE_LICENSE("GPL"); diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index b91da5998dd7..0ab7562d17c9 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c @@ -564,5 +564,6 @@ static void __exit agp_serverworks_cleanup(void) module_init(agp_serverworks_init); module_exit(agp_serverworks_cleanup); +MODULE_DESCRIPTION("Serverworks AGPGART routines"); MODULE_LICENSE("GPL and additional rights"); From c260bda655993bf72d3f9a6df9e9021c3c1cd1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 24 Jun 2024 15:29:04 +0200 Subject: [PATCH 17/21] fbdev: Drop explicit initialization of struct i2c_device_id::driver_data to 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller --- drivers/video/fbdev/matrox/matroxfb_maven.c | 2 +- drivers/video/fbdev/ssd1307fb.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_maven.c b/drivers/video/fbdev/matrox/matroxfb_maven.c index b15a8ad92ba7..dcfae770b42d 100644 --- a/drivers/video/fbdev/matrox/matroxfb_maven.c +++ b/drivers/video/fbdev/matrox/matroxfb_maven.c @@ -1282,7 +1282,7 @@ static void maven_remove(struct i2c_client *client) } static const struct i2c_device_id maven_id[] = { - { "maven", 0 }, + { "maven" }, { } }; MODULE_DEVICE_TABLE(i2c, maven_id); diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 3f30af3c059e..aa6cc0a8151a 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -782,10 +782,10 @@ static void ssd1307fb_remove(struct i2c_client *client) } static const struct i2c_device_id ssd1307fb_i2c_id[] = { - { "ssd1305fb", 0 }, - { "ssd1306fb", 0 }, - { "ssd1307fb", 0 }, - { "ssd1309fb", 0 }, + { "ssd1305fb" }, + { "ssd1306fb" }, + { "ssd1307fb" }, + { "ssd1309fb" }, { } }; MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id); From b65bd7874bc7dc709645fd8acb53603b73ae950a Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Mon, 24 Jun 2024 21:59:42 +0200 Subject: [PATCH 18/21] fbdev: mmp: Constify struct mmp_overlay_ops 'struct mmp_overlay_ops' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 11798 555 16 12369 3051 drivers/video/fbdev/mmp/hw/mmp_ctrl.o After: ===== text data bss dec hex filename 11834 507 16 12357 3045 drivers/video/fbdev/mmp/hw/mmp_ctrl.o Signed-off-by: Christophe JAILLET Signed-off-by: Helge Deller --- drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 2 +- include/video/mmp_disp.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c index 76b50b6c98ad..a20a2c408127 100644 --- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c +++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c @@ -313,7 +313,7 @@ static void path_set_mode(struct mmp_path *path, struct mmp_mode *mode) mutex_unlock(&path->access_ok); } -static struct mmp_overlay_ops mmphw_overlay_ops = { +static const struct mmp_overlay_ops mmphw_overlay_ops = { .set_fetch = overlay_set_fetch, .set_onoff = overlay_set_onoff, .set_win = overlay_set_win, diff --git a/include/video/mmp_disp.h b/include/video/mmp_disp.h index a722dcbf5073..41354bd49895 100644 --- a/include/video/mmp_disp.h +++ b/include/video/mmp_disp.h @@ -156,7 +156,7 @@ struct mmp_overlay { int status; struct mutex access_ok; - struct mmp_overlay_ops *ops; + const struct mmp_overlay_ops *ops; }; /* panel type */ @@ -299,7 +299,7 @@ struct mmp_path_info { int overlay_num; void (*set_mode)(struct mmp_path *path, struct mmp_mode *mode); void (*set_onoff)(struct mmp_path *path, int status); - struct mmp_overlay_ops *overlay_ops; + const struct mmp_overlay_ops *overlay_ops; void *plat_data; }; From 7ee6cfe6d9cf53df926386801a006cc9c22e8a36 Mon Sep 17 00:00:00 2001 From: Chen Ni Date: Fri, 28 Jun 2024 11:28:12 +0800 Subject: [PATCH 19/21] fbdev: omap2: Return clk_prepare_enable to transfer the error Return clk_prepare_enable() in order to transfer the error if it fails. Signed-off-by: Chen Ni Signed-off-by: Helge Deller --- drivers/video/fbdev/omap2/omapfb/dss/venc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index 0bd80d3b8f1b..d13ad00d353b 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -903,9 +903,7 @@ static int venc_runtime_resume(struct device *dev) if (r < 0) return r; - clk_prepare_enable(venc.tv_dac_clk); - - return 0; + return clk_prepare_enable(venc.tv_dac_clk); } static const struct dev_pm_ops venc_pm_ops = { From 3cf12cabc3be2855466e1433d943455b1032fd86 Mon Sep 17 00:00:00 2001 From: Easwar Hariharan Date: Thu, 11 Jul 2024 05:27:33 +0000 Subject: [PATCH 20/21] fbdev: smscufx: Make I2C terminology more inclusive I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann Signed-off-by: Easwar Hariharan Signed-off-by: Helge Deller --- drivers/video/fbdev/smscufx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c index 35d682b110c4..5f0dd01fd834 100644 --- a/drivers/video/fbdev/smscufx.c +++ b/drivers/video/fbdev/smscufx.c @@ -1292,7 +1292,7 @@ static int ufx_realloc_framebuffer(struct ufx_data *dev, struct fb_info *info) return 0; } -/* sets up I2C Controller for 100 Kbps, std. speed, 7-bit addr, master, +/* sets up DDC channel for 100 Kbps, std. speed, 7-bit addr, controller mode, * restart enabled, but no start byte, enable controller */ static int ufx_i2c_init(struct ufx_data *dev) { @@ -1321,7 +1321,7 @@ static int ufx_i2c_init(struct ufx_data *dev) /* 7-bit (not 10-bit) addressing */ tmp &= ~(0x10); - /* enable restart conditions and master mode */ + /* enable restart conditions and controller mode */ tmp |= 0x21; status = ufx_reg_write(dev, 0x1000, tmp); From 8b5ea9029b03efda74292c57e0377a98ed0b7434 Mon Sep 17 00:00:00 2001 From: Easwar Hariharan Date: Thu, 11 Jul 2024 05:27:34 +0000 Subject: [PATCH 21/21] fbdev: viafb: Make I2C terminology more inclusive I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann Signed-off-by: Easwar Hariharan Signed-off-by: Helge Deller --- drivers/video/fbdev/via/chip.h | 8 ++++---- drivers/video/fbdev/via/dvi.c | 24 ++++++++++++------------ drivers/video/fbdev/via/lcd.c | 6 +++--- drivers/video/fbdev/via/via_aux.h | 2 +- drivers/video/fbdev/via/via_i2c.c | 12 ++++++------ drivers/video/fbdev/via/vt1636.c | 6 +++--- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/video/fbdev/via/chip.h b/drivers/video/fbdev/via/chip.h index f0a19cbcb9e5..f81af13630e2 100644 --- a/drivers/video/fbdev/via/chip.h +++ b/drivers/video/fbdev/via/chip.h @@ -69,7 +69,7 @@ #define VT1632_TMDS 0x01 #define INTEGRATED_TMDS 0x42 -/* Definition TMDS Trasmitter I2C Slave Address */ +/* Definition TMDS Trasmitter I2C Target Address */ #define VT1632_TMDS_I2C_ADDR 0x10 /**************************************************/ @@ -88,21 +88,21 @@ #define TX_DATA_DDR_MODE 0x04 #define TX_DATA_SDR_MODE 0x08 -/* Definition LVDS Trasmitter I2C Slave Address */ +/* Definition LVDS Trasmitter I2C Target Address */ #define VT1631_LVDS_I2C_ADDR 0x70 #define VT3271_LVDS_I2C_ADDR 0x80 #define VT1636_LVDS_I2C_ADDR 0x80 struct tmds_chip_information { int tmds_chip_name; - int tmds_chip_slave_addr; + int tmds_chip_target_addr; int output_interface; int i2c_port; }; struct lvds_chip_information { int lvds_chip_name; - int lvds_chip_slave_addr; + int lvds_chip_target_addr; int output_interface; int i2c_port; }; diff --git a/drivers/video/fbdev/via/dvi.c b/drivers/video/fbdev/via/dvi.c index 13147e3066eb..27990a73bfa3 100644 --- a/drivers/video/fbdev/via/dvi.c +++ b/drivers/video/fbdev/via/dvi.c @@ -70,7 +70,7 @@ bool viafb_tmds_trasmitter_identify(void) /* Check for VT1632: */ viaparinfo->chip_info->tmds_chip_info.tmds_chip_name = VT1632_TMDS; viaparinfo->chip_info-> - tmds_chip_info.tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR; + tmds_chip_info.tmds_chip_target_addr = VT1632_TMDS_I2C_ADDR; viaparinfo->chip_info->tmds_chip_info.i2c_port = VIA_PORT_31; if (check_tmds_chip(VT1632_DEVICE_ID_REG, VT1632_DEVICE_ID)) { /* @@ -128,14 +128,14 @@ bool viafb_tmds_trasmitter_identify(void) viaparinfo->chip_info-> tmds_chip_info.tmds_chip_name = NON_TMDS_TRANSMITTER; viaparinfo->chip_info->tmds_chip_info. - tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR; + tmds_chip_target_addr = VT1632_TMDS_I2C_ADDR; return false; } static void tmds_register_write(int index, u8 data) { viafb_i2c_writebyte(viaparinfo->chip_info->tmds_chip_info.i2c_port, - viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr, + viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr, index, data); } @@ -144,7 +144,7 @@ static int tmds_register_read(int index) u8 data; viafb_i2c_readbyte(viaparinfo->chip_info->tmds_chip_info.i2c_port, - (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr, + (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr, (u8) index, &data); return data; } @@ -152,7 +152,7 @@ static int tmds_register_read(int index) static int tmds_register_read_bytes(int index, u8 *buff, int buff_len) { viafb_i2c_readbytes(viaparinfo->chip_info->tmds_chip_info.i2c_port, - (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr, + (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr, (u8) index, buff, buff_len); return 0; } @@ -256,14 +256,14 @@ static int viafb_dvi_query_EDID(void) DEBUG_MSG(KERN_INFO "viafb_dvi_query_EDID!!\n"); - restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr; - viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = 0xA0; + restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr; + viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr = 0xA0; data0 = (u8) tmds_register_read(0x00); data1 = (u8) tmds_register_read(0x01); if ((data0 == 0) && (data1 == 0xFF)) { viaparinfo->chip_info-> - tmds_chip_info.tmds_chip_slave_addr = restore; + tmds_chip_info.tmds_chip_target_addr = restore; return EDID_VERSION_1; /* Found EDID1 Table */ } @@ -280,8 +280,8 @@ static void dvi_get_panel_size_from_DDCv1( DEBUG_MSG(KERN_INFO "\n dvi_get_panel_size_from_DDCv1 \n"); - restore = tmds_chip->tmds_chip_slave_addr; - tmds_chip->tmds_chip_slave_addr = 0xA0; + restore = tmds_chip->tmds_chip_target_addr; + tmds_chip->tmds_chip_target_addr = 0xA0; for (i = 0x25; i < 0x6D; i++) { switch (i) { case 0x36: @@ -306,7 +306,7 @@ static void dvi_get_panel_size_from_DDCv1( DEBUG_MSG(KERN_INFO "DVI max pixelclock = %d\n", tmds_setting->max_pixel_clock); - tmds_chip->tmds_chip_slave_addr = restore; + tmds_chip->tmds_chip_target_addr = restore; } /* If Disable DVI, turn off pad */ @@ -427,7 +427,7 @@ void viafb_dvi_enable(void) viafb_i2c_writebyte(viaparinfo->chip_info-> tmds_chip_info.i2c_port, viaparinfo->chip_info-> - tmds_chip_info.tmds_chip_slave_addr, + tmds_chip_info.tmds_chip_target_addr, 0x08, data); } } diff --git a/drivers/video/fbdev/via/lcd.c b/drivers/video/fbdev/via/lcd.c index beec5c8d4d08..8673fced8749 100644 --- a/drivers/video/fbdev/via/lcd.c +++ b/drivers/video/fbdev/via/lcd.c @@ -147,7 +147,7 @@ bool viafb_lvds_trasmitter_identify(void) return true; /* Check for VT1631: */ viaparinfo->chip_info->lvds_chip_info.lvds_chip_name = VT1631_LVDS; - viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr = + viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr = VT1631_LVDS_I2C_ADDR; if (check_lvds_chip(VT1631_DEVICE_ID_REG, VT1631_DEVICE_ID)) { @@ -161,7 +161,7 @@ bool viafb_lvds_trasmitter_identify(void) viaparinfo->chip_info->lvds_chip_info.lvds_chip_name = NON_LVDS_TRANSMITTER; - viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr = + viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr = VT1631_LVDS_I2C_ADDR; return false; } @@ -327,7 +327,7 @@ static int lvds_register_read(int index) u8 data; viafb_i2c_readbyte(VIA_PORT_2C, - (u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr, + (u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr, (u8) index, &data); return data; } diff --git a/drivers/video/fbdev/via/via_aux.h b/drivers/video/fbdev/via/via_aux.h index 0933bbf20e58..464723fd514c 100644 --- a/drivers/video/fbdev/via/via_aux.h +++ b/drivers/video/fbdev/via/via_aux.h @@ -24,7 +24,7 @@ struct via_aux_drv { struct list_head chain; /* chain to support multiple drivers */ struct via_aux_bus *bus; /* the I2C bus used */ - u8 addr; /* the I2C slave address */ + u8 addr; /* the I2C target address */ const char *name; /* human readable name of the driver */ void *data; /* private data of this driver */ diff --git a/drivers/video/fbdev/via/via_i2c.c b/drivers/video/fbdev/via/via_i2c.c index 582502810575..5edd3827ca27 100644 --- a/drivers/video/fbdev/via/via_i2c.c +++ b/drivers/video/fbdev/via/via_i2c.c @@ -104,7 +104,7 @@ static void via_i2c_setsda(void *data, int state) spin_unlock_irqrestore(&i2c_vdev->reg_lock, flags); } -int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata) +int viafb_i2c_readbyte(u8 adap, u8 target_addr, u8 index, u8 *pdata) { int ret; u8 mm1[] = {0x00}; @@ -115,7 +115,7 @@ int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata) *pdata = 0; msgs[0].flags = 0; msgs[1].flags = I2C_M_RD; - msgs[0].addr = msgs[1].addr = slave_addr / 2; + msgs[0].addr = msgs[1].addr = target_addr / 2; mm1[0] = index; msgs[0].len = 1; msgs[1].len = 1; msgs[0].buf = mm1; msgs[1].buf = pdata; @@ -128,7 +128,7 @@ int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata) return ret; } -int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data) +int viafb_i2c_writebyte(u8 adap, u8 target_addr, u8 index, u8 data) { int ret; u8 msg[2] = { index, data }; @@ -137,7 +137,7 @@ int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data) if (!via_i2c_par[adap].is_active) return -ENODEV; msgs.flags = 0; - msgs.addr = slave_addr / 2; + msgs.addr = target_addr / 2; msgs.len = 2; msgs.buf = msg; ret = i2c_transfer(&via_i2c_par[adap].adapter, &msgs, 1); @@ -149,7 +149,7 @@ int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data) return ret; } -int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len) +int viafb_i2c_readbytes(u8 adap, u8 target_addr, u8 index, u8 *buff, int buff_len) { int ret; u8 mm1[] = {0x00}; @@ -159,7 +159,7 @@ int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len return -ENODEV; msgs[0].flags = 0; msgs[1].flags = I2C_M_RD; - msgs[0].addr = msgs[1].addr = slave_addr / 2; + msgs[0].addr = msgs[1].addr = target_addr / 2; mm1[0] = index; msgs[0].len = 1; msgs[1].len = buff_len; msgs[0].buf = mm1; msgs[1].buf = buff; diff --git a/drivers/video/fbdev/via/vt1636.c b/drivers/video/fbdev/via/vt1636.c index 8d8cfdb05618..0d58ca144e19 100644 --- a/drivers/video/fbdev/via/vt1636.c +++ b/drivers/video/fbdev/via/vt1636.c @@ -44,7 +44,7 @@ u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information u8 data; viafb_i2c_readbyte(plvds_chip_info->i2c_port, - plvds_chip_info->lvds_chip_slave_addr, index, &data); + plvds_chip_info->lvds_chip_target_addr, index, &data); return data; } @@ -60,7 +60,7 @@ void viafb_gpio_i2c_write_mask_lvds(struct lvds_setting_information data = (data & (~io_data.Mask)) | io_data.Data; viafb_i2c_writebyte(plvds_chip_info->i2c_port, - plvds_chip_info->lvds_chip_slave_addr, index, data); + plvds_chip_info->lvds_chip_target_addr, index, data); } void viafb_init_lvds_vt1636(struct lvds_setting_information @@ -113,7 +113,7 @@ bool viafb_lvds_identify_vt1636(u8 i2c_adapter) DEBUG_MSG(KERN_INFO "viafb_lvds_identify_vt1636.\n"); /* Sense VT1636 LVDS Transmiter */ - viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr = + viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr = VT1636_LVDS_I2C_ADDR; /* Check vendor ID first: */