Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f12491c36acb94670d822a90c9295f6fd671c8a
Commit:     5f12491c36acb94670d822a90c9295f6fd671c8a
Parent:     452c0fb46b1d68b1dae37cea7ccebd70a80397e4
Author:     Trent Piepho <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 27 22:56:28 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed May 9 10:12:30 2007 -0300

    V4L/DVB (5570): V4l1-compat: misc fixes for pixelformat function
    
    Mark the palette2pixelformat lookup table as const
    
    pixelformat is unsigned, adjust the palette2pixelformat table and
    pixelformat_to_palette()
    
    palette_to_pixelformat() is a pure function
    
    pixelformat_to_palette() is a const function
    
    Signed-off-by: Trent Piepho <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/v4l1-compat.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/v4l1-compat.c 
b/drivers/media/video/v4l1-compat.c
index a861e15..efb67d2 100644
--- a/drivers/media/video/v4l1-compat.c
+++ b/drivers/media/video/v4l1-compat.c
@@ -127,7 +127,7 @@ set_v4l_control(struct inode            *inode,
 
 /* ----------------------------------------------------------------- */
 
-static int palette2pixelformat[] = {
+const static unsigned int palette2pixelformat[] = {
        [VIDEO_PALETTE_GREY]    = V4L2_PIX_FMT_GREY,
        [VIDEO_PALETTE_RGB555]  = V4L2_PIX_FMT_RGB555,
        [VIDEO_PALETTE_RGB565]  = V4L2_PIX_FMT_RGB565,
@@ -145,7 +145,7 @@ static int palette2pixelformat[] = {
        [VIDEO_PALETTE_YUV422P] = V4L2_PIX_FMT_YUV422P,
 };
 
-static unsigned int
+static unsigned int __attribute_pure__
 palette_to_pixelformat(unsigned int palette)
 {
        if (palette < ARRAY_SIZE(palette2pixelformat))
@@ -154,8 +154,8 @@ palette_to_pixelformat(unsigned int palette)
                return 0;
 }
 
-static unsigned int
-pixelformat_to_palette(int pixelformat)
+static unsigned int __attribute_const__
+pixelformat_to_palette(unsigned int pixelformat)
 {
        int     palette = 0;
        switch (pixelformat)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to