Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e581ff165f26ba3d37a4a836b2e3add47bec72f
Commit:     4e581ff165f26ba3d37a4a836b2e3add47bec72f
Parent:     4ab70df451c6183dd5474a68edac44684b0b7616
Author:     Venkatesh Pallipadi <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 10:41:16 2006 -0800
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 18:12:31 2006 -0500

    [CPUFREQ] Trivial cleanup for acpi read/write port in acpi-cpufreq.c
    
    Small cleanup in acpi-cpufreq.
    
    Signed-off-by: Venkatesh Pallipadi <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
---
 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |   29 +++++---------------------
 1 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 
b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 18f4715..8e0b995 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -126,27 +126,6 @@ static unsigned extract_freq(u32 val, struct 
acpi_cpufreq_data *data)
        }
 }
 
-static void wrport(u16 port, u8 bit_width, u32 value)
-{
-       if (bit_width <= 8)
-               outb(value, port);
-       else if (bit_width <= 16)
-               outw(value, port);
-       else if (bit_width <= 32)
-               outl(value, port);
-}
-
-static void rdport(u16 port, u8 bit_width, u32 * ret)
-{
-       *ret = 0;
-       if (bit_width <= 8)
-               *ret = inb(port);
-       else if (bit_width <= 16)
-               *ret = inw(port);
-       else if (bit_width <= 32)
-               *ret = inl(port);
-}
-
 struct msr_addr {
        u32 reg;
 };
@@ -177,7 +156,9 @@ static void do_drv_read(struct drv_cmd *cmd)
                rdmsr(cmd->addr.msr.reg, cmd->val, h);
                break;
        case SYSTEM_IO_CAPABLE:
-               rdport(cmd->addr.io.port, cmd->addr.io.bit_width, &cmd->val);
+               acpi_os_read_port((acpi_io_address)cmd->addr.io.port,
+                               &cmd->val,
+                               (u32)cmd->addr.io.bit_width);
                break;
        default:
                break;
@@ -193,7 +174,9 @@ static void do_drv_write(struct drv_cmd *cmd)
                wrmsr(cmd->addr.msr.reg, cmd->val, h);
                break;
        case SYSTEM_IO_CAPABLE:
-               wrport(cmd->addr.io.port, cmd->addr.io.bit_width, cmd->val);
+               acpi_os_write_port((acpi_io_address)cmd->addr.io.port,
+                               cmd->val,
+                               (u32)cmd->addr.io.bit_width);
                break;
        default:
                break;
-
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