Skip to content

Commit cfdafb7

Browse files
Benjamin-Philipgregkh
authored andcommitted
staging: sm750fb: Rename maxH to max_h in lynx_cursor
The struct lynx_cursor has a member named maxH. This name is CamelCase and is frowned upon. This commit renames it to max_h and makes the necessary changes for the module to build. This change also fixes the following checkpatch CHECK: CHECK: Avoid CamelCase: <maxH> 116: FILE: drivers/staging/sm750fb/sm750.c:116: + fbcursor->image.height > cursor->maxH || Signed-off-by: Benjamin Philip <[email protected]> Link: https://lore.kernel.org/r/692211000786d76aa41bc24d4ee06b5868d82771.1627304144.git.benjamin.philip495@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7b9148d commit cfdafb7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/staging/sm750fb/sm750.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
113113
cursor = &crtc->cursor;
114114

115115
if (fbcursor->image.width > cursor->maxW ||
116-
fbcursor->image.height > cursor->maxH ||
116+
fbcursor->image.height > cursor->max_h ||
117117
fbcursor->image.depth > 1) {
118118
return -ENXIO;
119119
}
@@ -723,8 +723,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
723723
0x800f0 + (int)crtc->channel * 0x140;
724724

725725
pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio);
726-
crtc->cursor.maxH = crtc->cursor.maxW = 64;
727-
crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8;
726+
crtc->cursor.max_h = crtc->cursor.maxW = 64;
727+
crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.maxW * 2 / 8;
728728
crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;
729729

730730
memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);

drivers/staging/sm750fb/sm750.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ struct lynx_cursor {
123123
int size;
124124
/* hardware limitation */
125125
int maxW;
126-
int maxH;
126+
int max_h;
127127
/* base virtual address and offset of cursor image */
128128
char __iomem *vstart;
129129
int offset;

0 commit comments

Comments
 (0)