From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 07/11] Remove variable size restrictions
Date: Fri, 19 Nov 2010 13:50:59 +0100 [thread overview]
Message-ID: <1290171063-28870-8-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1290171063-28870-1-git-send-email-jbe@pengutronix.de>
There is no really need for restricted variable types in these structures.
Replace them by standard C types with the same behaviour.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
include/fb.h | 41 ++++++++++++++++++++---------------------
1 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/include/fb.h b/include/fb.h
index 36b2a74..a1bd147 100644
--- a/include/fb.h
+++ b/include/fb.h
@@ -43,19 +43,19 @@
struct fb_videomode {
const char *name; /* optional */
- u32 refresh; /* optional */
- u32 xres;
- u32 yres;
- u32 pixclock;
- u32 left_margin;
- u32 right_margin;
- u32 upper_margin;
- u32 lower_margin;
- u32 hsync_len;
- u32 vsync_len;
- u32 sync;
- u32 vmode;
- u32 flag;
+ unsigned refresh; /* optional */
+ unsigned xres;
+ unsigned yres;
+ unsigned pixclock;
+ unsigned left_margin;
+ unsigned right_margin;
+ unsigned upper_margin;
+ unsigned lower_margin;
+ unsigned hsync_len;
+ unsigned vsync_len;
+ unsigned sync;
+ unsigned vmode;
+ unsigned flag;
};
/* Interpretation of offset for color fields: All offsets are from the right,
@@ -69,10 +69,9 @@ struct fb_videomode {
* of available palette entries (i.e. # of entries = 1 << length).
*/
struct fb_bitfield {
- u32 offset; /* beginning of bitfield */
- u32 length; /* length of bitfield */
- u32 msb_right; /* != 0 : Most significant bit is */
- /* right */
+ unsigned offset; /* beginning of bitfield */
+ unsigned length; /* length of bitfield */
+ int msb_right; /* != 0 : Most significant bit is right */
};
struct fb_info;
@@ -98,11 +97,11 @@ struct fb_info {
struct cdev cdev;
const struct fb_videomode *active_mode;
- u32 xres; /* visible resolution */
- u32 yres;
- u32 bits_per_pixel; /* guess what */
+ unsigned xres; /* visible resolution */
+ unsigned yres;
+ unsigned bits_per_pixel; /* guess what */
- u32 grayscale; /* != 0 Graylevels instead of colors */
+ int grayscale; /* != 0 Graylevels instead of colors */
struct fb_bitfield red; /* bitfield in fb mem if true color, */
struct fb_bitfield green; /* else only length is significant */
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-11-19 12:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 12:50 [PATCHv3] Add dynamic video initialization to barebox Juergen Beisert
2010-11-19 12:50 ` [PATCH 01/11] Separate framebuffer platformdata and the videomode Juergen Beisert
2010-11-19 12:50 ` [PATCH 02/11] Add more flags for sync control Juergen Beisert
2010-11-19 12:50 ` [PATCH 03/11] Bring in dynamic videomode selection at runtime Juergen Beisert
2010-11-19 12:50 ` [PATCH 04/11] Add verbose framebuffer device info Juergen Beisert
2010-11-19 12:50 ` [PATCH 05/11] Adapt the existing imx fb driver to support runtime videomode selection Juergen Beisert
2010-11-19 12:50 ` [PATCH 06/11] Adapt the existing imx-ipu " Juergen Beisert
2010-11-19 12:50 ` Juergen Beisert [this message]
2010-11-19 12:51 ` [PATCH 08/11] Add doxygen documentation to the framebfuffer code Juergen Beisert
2010-11-19 12:51 ` [PATCH 09/11] Provide more driver specific data in a videomode Juergen Beisert
2010-11-19 12:51 ` [PATCH 10/11] Add a video driver for S3C2440 bases platforms Juergen Beisert
2010-11-19 12:51 ` [PATCH 11/11] STM378x: Add video driver for this platform Juergen Beisert
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=1290171063-28870-8-git-send-email-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=barebox@lists.infradead.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