Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9501b2efd70ad3957a70d44de54dab7c52f9b882
Commit:     9501b2efd70ad3957a70d44de54dab7c52f9b882
Parent:     fa28e067c3b8af96c79c060e163b1387c172ae75
Author:     Andres Salomon <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 9 23:24:08 2008 +0100
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Sat Feb 9 23:24:08 2008 +0100

    x86: GEODE: MFGPT: replace 'flags' field with 'avail' bit
    
    Drop F_AVAIL and the 'flags' field, replacing with an 'avail' bit.  This
    looks more understandable to me.
    
    Signed-off-by: Andres Salomon <[EMAIL PROTECTED]>
    Signed-off-by: Jordan Crouse <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/mfgpt_32.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 186bd36..6f79061 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -32,10 +32,8 @@
 #include <linux/interrupt.h>
 #include <asm/geode.h>
 
-#define F_AVAIL    0x01
-
 static struct mfgpt_timer_t {
-       int flags;
+       unsigned int avail:1;
 } mfgpt_timers[MFGPT_MAX_TIMERS];
 
 /* Selected from the table above */
@@ -95,7 +93,7 @@ int __init geode_mfgpt_detect(void)
        for (i = 0; i < MFGPT_MAX_TIMERS; i++) {
                val = geode_mfgpt_read(i, MFGPT_REG_SETUP);
                if (!(val & MFGPT_SETUP_SETUP)) {
-                       mfgpt_timers[i].flags = F_AVAIL;
+                       mfgpt_timers[i].avail = 1;
                        count++;
                }
        }
@@ -182,7 +180,7 @@ int geode_mfgpt_set_irq(int timer, int cmp, int irq, int 
enable)
 
 static int mfgpt_get(int timer)
 {
-       mfgpt_timers[timer].flags &= ~F_AVAIL;
+       mfgpt_timers[timer].avail = 0;
        printk(KERN_INFO "geode-mfgpt:  Registered timer %d\n", timer);
        return timer;
 }
@@ -199,7 +197,7 @@ int geode_mfgpt_alloc_timer(int timer, int domain)
        if (timer < 0) {
                /* Try to find an available timer */
                for (i = 0; i < MFGPT_MAX_TIMERS; i++) {
-                       if (mfgpt_timers[i].flags & F_AVAIL)
+                       if (mfgpt_timers[i].avail)
                                return mfgpt_get(i);
 
                        if (i == 5 && domain == MFGPT_DOMAIN_WORKING)
@@ -207,7 +205,7 @@ int geode_mfgpt_alloc_timer(int timer, int domain)
                }
        } else {
                /* If they requested a specific timer, try to honor that */
-               if (mfgpt_timers[timer].flags & F_AVAIL)
+               if (mfgpt_timers[timer].avail)
                        return mfgpt_get(timer);
        }
 
-
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