2023-07-06 10:57:10

by Thomas Zimmermann

[permalink] [raw]
Subject: [PATCH v2 2/4] fbdev/sm712fb: Do not include <linux/screen_info.h>

Sm712fb's dependency on <linux/screen_info.h> is artificial in that
it only uses struct screen_info for its internals. Replace the use of
struct screen_info with a custom data structure and remove the include
of <linux/screen_info.h>.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Cc: Sudip Mukherjee <[email protected]>
Cc: Teddy Wang <[email protected]>
Cc: Helge Deller <[email protected]>
---
drivers/video/fbdev/sm712fb.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c
index b7ad3c644e13..f929091da4e7 100644
--- a/drivers/video/fbdev/sm712fb.c
+++ b/drivers/video/fbdev/sm712fb.c
@@ -27,12 +27,17 @@
#include <linux/uaccess.h>
#include <linux/module.h>
#include <linux/console.h>
-#include <linux/screen_info.h>

#include <linux/pm.h>

#include "sm712.h"

+struct smtcfb_screen_info {
+ u16 lfb_width;
+ u16 lfb_height;
+ u16 lfb_depth;
+};
+
/*
* Private structure
*/
@@ -829,7 +834,7 @@ static const struct modeinit vgamode[] = {
},
};

-static struct screen_info smtc_scr_info;
+static struct smtcfb_screen_info smtc_scr_info;

static char *mode_option;

--
2.41.0



2023-07-06 11:46:19

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] fbdev/sm712fb: Do not include <linux/screen_info.h>

On Thu, Jul 6, 2023, at 12:42, Thomas Zimmermann wrote:
> Sm712fb's dependency on <linux/screen_info.h> is artificial in that
> it only uses struct screen_info for its internals. Replace the use of
> struct screen_info with a custom data structure and remove the include
> of <linux/screen_info.h>.
>
> Signed-off-by: Thomas Zimmermann <[email protected]>
> Reviewed-by: Javier Martinez Canillas <[email protected]>
> Cc: Sudip Mukherjee <[email protected]>
> Cc: Teddy Wang <[email protected]>
> Cc: Helge Deller <[email protected]>

Reviewed-by: Arnd Bergmann <[email protected]>