Skip to content

Commit b84acc1

Browse files
committed
Merge tag 'fbdev-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev updates from Helge Deller: - Drop the mx3fb driver - Use list_for_each_entry() helper in fbcore code - Shorten neofb product names for fb-fix id field - reduce memory usage in ssd1307fb * tag 'fbdev-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: Update fbdev source file paths fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags fbdev: neofb: Shorten Neomagic product name in info struct fbdev: mx3fb: Remove the driver fbdev/core: Use list_for_each_entry() helper
2 parents 1c9f8df + 4a9762a commit b84acc1

File tree

9 files changed

+23
-1805
lines changed

9 files changed

+23
-1805
lines changed

drivers/video/fbdev/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,17 +1887,6 @@ config FB_PRE_INIT_FB
18871887
Select this option if display contents should be inherited as set by
18881888
the bootloader.
18891889

1890-
config FB_MX3
1891-
tristate "MX3 Framebuffer support"
1892-
depends on FB && MX3_IPU
1893-
select BACKLIGHT_CLASS_DEVICE
1894-
select FB_IOMEM_HELPERS
1895-
default y
1896-
help
1897-
This is a framebuffer device for the i.MX31 LCD Controller. So
1898-
far only synchronous displays are supported. If you plan to use
1899-
an LCD display with your i.MX31 system, say Y here.
1900-
19011890
config FB_BROADSHEET
19021891
tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
19031892
depends on FB && (ARCH_PXA || COMPILE_TEST)

drivers/video/fbdev/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ obj-$(CONFIG_FB_VESA) += vesafb.o
122122
obj-$(CONFIG_FB_EFI) += efifb.o
123123
obj-$(CONFIG_FB_VGA16) += vga16fb.o
124124
obj-$(CONFIG_FB_OF) += offb.o
125-
obj-$(CONFIG_FB_MX3) += mx3fb.o
126125
obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o
127126
obj-$(CONFIG_FB_SSD1307) += ssd1307fb.o
128127
obj-$(CONFIG_FB_SIMPLE) += simplefb.o

drivers/video/fbdev/core/fbsysfs.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@ static ssize_t store_mode(struct device *device, struct device_attribute *attr,
6161
struct fb_var_screeninfo var;
6262
struct fb_modelist *modelist;
6363
struct fb_videomode *mode;
64-
struct list_head *pos;
6564
size_t i;
6665
int err;
6766

6867
memset(&var, 0, sizeof(var));
6968

70-
list_for_each(pos, &fb_info->modelist) {
71-
modelist = list_entry(pos, struct fb_modelist, list);
69+
list_for_each_entry(modelist, &fb_info->modelist, list) {
7270
mode = &modelist->mode;
7371
i = mode_string(mstr, 0, mode);
7472
if (strncmp(mstr, buf, max(count, i)) == 0) {
@@ -129,13 +127,11 @@ static ssize_t show_modes(struct device *device, struct device_attribute *attr,
129127
{
130128
struct fb_info *fb_info = dev_get_drvdata(device);
131129
unsigned int i;
132-
struct list_head *pos;
133130
struct fb_modelist *modelist;
134131
const struct fb_videomode *mode;
135132

136133
i = 0;
137-
list_for_each(pos, &fb_info->modelist) {
138-
modelist = list_entry(pos, struct fb_modelist, list);
134+
list_for_each_entry(modelist, &fb_info->modelist, list) {
139135
mode = &modelist->mode;
140136
i += mode_string(buf, i, mode);
141137
}

drivers/video/fbdev/core/modedb.c

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -963,15 +963,12 @@ int fb_mode_is_equal(const struct fb_videomode *mode1,
963963
const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
964964
struct list_head *head)
965965
{
966-
struct list_head *pos;
967966
struct fb_modelist *modelist;
968967
struct fb_videomode *mode, *best = NULL;
969968
u32 diff = -1;
970969

971-
list_for_each(pos, head) {
970+
list_for_each_entry(modelist, head, list) {
972971
u32 d;
973-
974-
modelist = list_entry(pos, struct fb_modelist, list);
975972
mode = &modelist->mode;
976973

977974
if (mode->xres >= var->xres && mode->yres >= var->yres) {
@@ -1001,15 +998,12 @@ const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var
1001998
const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
1002999
struct list_head *head)
10031000
{
1004-
struct list_head *pos;
10051001
struct fb_modelist *modelist;
10061002
struct fb_videomode *cmode, *best = NULL;
10071003
u32 diff = -1, diff_refresh = -1;
10081004

1009-
list_for_each(pos, head) {
1005+
list_for_each_entry(modelist, head, list) {
10101006
u32 d;
1011-
1012-
modelist = list_entry(pos, struct fb_modelist, list);
10131007
cmode = &modelist->mode;
10141008

10151009
d = abs(cmode->xres - mode->xres) +
@@ -1041,13 +1035,11 @@ const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
10411035
const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
10421036
struct list_head *head)
10431037
{
1044-
struct list_head *pos;
10451038
struct fb_modelist *modelist;
10461039
struct fb_videomode *m, mode;
10471040

10481041
fb_var_to_videomode(&mode, var);
1049-
list_for_each(pos, head) {
1050-
modelist = list_entry(pos, struct fb_modelist, list);
1042+
list_for_each_entry(modelist, head, list) {
10511043
m = &modelist->mode;
10521044
if (fb_mode_is_equal(m, &mode))
10531045
return m;
@@ -1065,13 +1057,11 @@ const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
10651057
*/
10661058
int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head)
10671059
{
1068-
struct list_head *pos;
10691060
struct fb_modelist *modelist;
10701061
struct fb_videomode *m;
10711062
int found = 0;
10721063

1073-
list_for_each(pos, head) {
1074-
modelist = list_entry(pos, struct fb_modelist, list);
1064+
list_for_each_entry(modelist, head, list) {
10751065
m = &modelist->mode;
10761066
if (fb_mode_is_equal(m, mode)) {
10771067
found = 1;
@@ -1152,7 +1142,6 @@ void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
11521142
const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
11531143
struct list_head *head)
11541144
{
1155-
struct list_head *pos;
11561145
struct fb_modelist *modelist;
11571146
const struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL;
11581147
int first = 0;
@@ -1161,8 +1150,7 @@ const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
11611150
goto finished;
11621151

11631152
/* get the first detailed mode and the very first mode */
1164-
list_for_each(pos, head) {
1165-
modelist = list_entry(pos, struct fb_modelist, list);
1153+
list_for_each_entry(modelist, head, list) {
11661154
m = &modelist->mode;
11671155

11681156
if (!first) {

0 commit comments

Comments
 (0)