From: "Javier M. Mellid" <jmunhoz@igalia.com>
To: gregkh@linuxfoundation.org, gewang@siliconmotion.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
"Javier M. Mellid" <jmunhoz@igalia.com>
Subject: [PATCH 1/9] staging: sm7xxfb: fix struct names related to vesa modes
Date: Wed, 11 Jul 2012 15:49:33 +0200 [thread overview]
Message-ID: <1342014581-2979-2-git-send-email-jmunhoz@igalia.com> (raw)
In-Reply-To: <1342014581-2979-1-git-send-email-jmunhoz@igalia.com>
From: "Javier M. Mellid" <jmunhoz@igalia.com>
This patch renames structs related to vesa modes in order to get more
readable code on sm712vga_setup.
Tested with SM712.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
---
drivers/staging/sm7xxfb/sm7xxfb.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index e3511ec..28aa903 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -56,14 +56,14 @@ struct smtcfb_info {
u_int hz;
};
-struct vesa_mode_table {
- char mode_index[6];
- u16 lfb_width;
- u16 lfb_height;
- u16 lfb_depth;
+struct vesa_mode {
+ char index[6];
+ u16 lfb_width;
+ u16 lfb_height;
+ u16 lfb_depth;
};
-static struct vesa_mode_table vesa_mode[] = {
+static struct vesa_mode vesa_mode_table[] = {
{"0x301", 640, 480, 8},
{"0x303", 800, 600, 8},
{"0x305", 1024, 768, 8},
@@ -776,13 +776,15 @@ static int __init sm712vga_setup(char *options)
pr_debug("sm712vga_setup = %s\n", options);
for (index = 0;
- index < ARRAY_SIZE(vesa_mode);
+ index < ARRAY_SIZE(vesa_mode_table);
index++) {
- if (strstr(options, vesa_mode[index].mode_index)) {
- smtc_screen_info.lfb_width = vesa_mode[index].lfb_width;
+ if (strstr(options, vesa_mode_table[index].index)) {
+ smtc_screen_info.lfb_width =
+ vesa_mode_table[index].lfb_width;
smtc_screen_info.lfb_height =
- vesa_mode[index].lfb_height;
- smtc_screen_info.lfb_depth = vesa_mode[index].lfb_depth;
+ vesa_mode_table[index].lfb_height;
+ smtc_screen_info.lfb_depth =
+ vesa_mode_table[index].lfb_depth;
return 0;
}
}
--
1.7.10
next prev parent reply other threads:[~2012-07-11 13:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 13:49 [PATCH 0/9] staging: sm7xxfb: code improvements and cleanup Javier M. Mellid
2012-07-11 13:49 ` Javier M. Mellid [this message]
2012-07-11 13:49 ` [PATCH 2/9] staging: sm7xxfb: rename index var on sm712vga_setup Javier M. Mellid
2012-07-11 13:49 ` [PATCH 3/9] staging: sm7xxfb: rename smtc_screen_info to smtc_scr_info Javier M. Mellid
2012-07-11 13:49 ` [PATCH 4/9] staging: sm7xxfb: rename sm712vga_setup to sm7xx_vga_setup Javier M. Mellid
2012-07-11 13:49 ` [PATCH 5/9] staging: sm7xxfb: minor maintenance on sm7xx_vga_setup Javier M. Mellid
2012-07-11 13:49 ` [PATCH 6/9] staging: sm7xxfb: rename sm712_set_timing to sm7xx_set_timing Javier M. Mellid
2012-07-11 13:49 ` [PATCH 7/9] staging: sm7xxfb: minor maintenance on timing path Javier M. Mellid
2012-07-11 13:49 ` [PATCH 8/9] staging: sm7xxfb: move pseudo palette into smtcfb_info Javier M. Mellid
2012-07-11 13:49 ` [PATCH 9/9] staging: sm7xxfb: cleanup on smtc_alloc_fb_info Javier M. Mellid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342014581-2979-2-git-send-email-jmunhoz@igalia.com \
--to=jmunhoz@igalia.com \
--cc=devel@driverdev.osuosl.org \
--cc=gewang@siliconmotion.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®