Skip to content

Commit 1a3e528

Browse files
committed
video: udlfb: deifdefify (yes, that's a word).
udlfb selects all of the options it presently ifdef conditionalizes, so none of the statements have any effect outside of aggravating eye strain. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 96f8d86 commit 1a3e528

1 file changed

Lines changed: 2 additions & 39 deletions

File tree

‎drivers/video/udlfb.c‎

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ static struct fb_fix_screeninfo dlfb_fix = {
3939
};
4040

4141
static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
42-
#ifdef FBINFO_VIRTFB
4342
FBINFO_VIRTFB |
44-
#endif
4543
FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
4644
FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
4745

@@ -594,18 +592,6 @@ int dlfb_handle_damage(struct dlfb_data *dev, int x, int y,
594592
return 0;
595593
}
596594

597-
static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf,
598-
size_t count, loff_t *ppos)
599-
{
600-
ssize_t result = -ENOSYS;
601-
602-
#if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE
603-
result = fb_sys_read(info, buf, count, ppos);
604-
#endif
605-
606-
return result;
607-
}
608-
609595
/*
610596
* Path triggered by usermode clients who write to filesystem
611597
* e.g. cat filename > /dev/fb1
@@ -615,12 +601,10 @@ static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf,
615601
static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf,
616602
size_t count, loff_t *ppos)
617603
{
618-
ssize_t result = -ENOSYS;
604+
ssize_t result;
619605
struct dlfb_data *dev = info->par;
620606
u32 offset = (u32) *ppos;
621607

622-
#if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE
623-
624608
result = fb_sys_write(info, buf, count, ppos);
625609

626610
if (result > 0) {
@@ -631,7 +615,6 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf,
631615
dlfb_handle_damage(dev, 0, start, info->var.xres,
632616
lines, info->screen_base);
633617
}
634-
#endif
635618

636619
return result;
637620
}
@@ -643,48 +626,34 @@ static void dlfb_ops_copyarea(struct fb_info *info,
643626

644627
struct dlfb_data *dev = info->par;
645628

646-
#if defined CONFIG_FB_SYS_COPYAREA || defined CONFIG_FB_SYS_COPYAREA_MODULE
647-
648629
sys_copyarea(info, area);
649630

650631
dlfb_handle_damage(dev, area->dx, area->dy,
651632
area->width, area->height, info->screen_base);
652-
#endif
653-
654633
}
655634

656635
static void dlfb_ops_imageblit(struct fb_info *info,
657636
const struct fb_image *image)
658637
{
659638
struct dlfb_data *dev = info->par;
660639

661-
#if defined CONFIG_FB_SYS_IMAGEBLIT || defined CONFIG_FB_SYS_IMAGEBLIT_MODULE
662-
663640
sys_imageblit(info, image);
664641

665642
dlfb_handle_damage(dev, image->dx, image->dy,
666643
image->width, image->height, info->screen_base);
667-
668-
#endif
669-
670644
}
671645

672646
static void dlfb_ops_fillrect(struct fb_info *info,
673647
const struct fb_fillrect *rect)
674648
{
675649
struct dlfb_data *dev = info->par;
676650

677-
#if defined CONFIG_FB_SYS_FILLRECT || defined CONFIG_FB_SYS_FILLRECT_MODULE
678-
679651
sys_fillrect(info, rect);
680652

681653
dlfb_handle_damage(dev, rect->dx, rect->dy, rect->width,
682654
rect->height, info->screen_base);
683-
#endif
684-
685655
}
686656

687-
#ifdef CONFIG_FB_DEFERRED_IO
688657
/*
689658
* NOTE: fb_defio.c is holding info->fbdefio.mutex
690659
* Touching ANY framebuffer memory that triggers a page fault
@@ -746,8 +715,6 @@ static void dlfb_dpy_deferred_io(struct fb_info *info,
746715
&dev->cpu_kcycles_used);
747716
}
748717

749-
#endif
750-
751718
static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len)
752719
{
753720
int i;
@@ -880,7 +847,6 @@ static int dlfb_ops_open(struct fb_info *info, int user)
880847

881848
kref_get(&dev->kref);
882849

883-
#ifdef CONFIG_FB_DEFERRED_IO
884850
if (fb_defio && (info->fbdefio == NULL)) {
885851
/* enable defio at last moment if not disabled by client */
886852

@@ -896,7 +862,6 @@ static int dlfb_ops_open(struct fb_info *info, int user)
896862
info->fbdefio = fbdefio;
897863
fb_deferred_io_init(info);
898864
}
899-
#endif
900865

901866
dl_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n",
902867
info->node, user, info, dev->fb_count);
@@ -977,14 +942,12 @@ static int dlfb_ops_release(struct fb_info *info, int user)
977942
if (dev->virtualized && (dev->fb_count == 0))
978943
schedule_delayed_work(&dev->free_framebuffer_work, HZ);
979944

980-
#ifdef CONFIG_FB_DEFERRED_IO
981945
if ((dev->fb_count == 0) && (info->fbdefio)) {
982946
fb_deferred_io_cleanup(info);
983947
kfree(info->fbdefio);
984948
info->fbdefio = NULL;
985949
info->fbops->fb_mmap = dlfb_ops_mmap;
986950
}
987-
#endif
988951

989952
dl_warn("released /dev/fb%d user=%d count=%d\n",
990953
info->node, user, dev->fb_count);
@@ -1103,7 +1066,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info)
11031066

11041067
static struct fb_ops dlfb_ops = {
11051068
.owner = THIS_MODULE,
1106-
.fb_read = dlfb_ops_read,
1069+
.fb_read = fb_sys_read,
11071070
.fb_write = dlfb_ops_write,
11081071
.fb_setcolreg = dlfb_ops_setcolreg,
11091072
.fb_fillrect = dlfb_ops_fillrect,

0 commit comments

Comments
 (0)