]> err.no Git - linux-2.6/commitdiff
firewire: use bitwise and to get reg in handle_registers
authorJarod Wilson <jwilson@redhat.com>
Sat, 8 Mar 2008 18:18:58 +0000 (13:18 -0500)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 18 Apr 2008 15:55:36 +0000 (17:55 +0200)
for code efficiency.

Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-transaction.c

index 47bfe761250f5b9c85a403f9432acc0fe3233ad2..3682e75a09e1bb3b534232a383f6ddbee778d28e 100644 (file)
@@ -797,7 +797,7 @@ handle_registers(struct fw_card *card, struct fw_request *request,
                 unsigned long long offset,
                 void *payload, size_t length, void *callback_data)
 {
-       int reg = offset CSR_REGISTER_BASE;
+       int reg = offset & ~CSR_REGISTER_BASE;
        unsigned long long bus_time;
        __be32 *data = payload;