Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee139...
[sfrench/cifs-2.6.git] / drivers / firewire / ohci.c
index d731b413cb2ce504c5cb895cdec0d91e4231fe01..45c048751f3bd8a9527631d26673cc7f603fe85e 100644 (file)
@@ -734,7 +734,7 @@ static unsigned int ar_search_last_active_buffer(struct ar_context *ctx,
        __le16 res_count, next_res_count;
 
        i = ar_first_buffer_index(ctx);
-       res_count = ACCESS_ONCE(ctx->descriptors[i].res_count);
+       res_count = READ_ONCE(ctx->descriptors[i].res_count);
 
        /* A buffer that is not yet completely filled must be the last one. */
        while (i != last && res_count == 0) {
@@ -742,8 +742,7 @@ static unsigned int ar_search_last_active_buffer(struct ar_context *ctx,
                /* Peek at the next descriptor. */
                next_i = ar_next_buffer_index(i);
                rmb(); /* read descriptors in order */
-               next_res_count = ACCESS_ONCE(
-                               ctx->descriptors[next_i].res_count);
+               next_res_count = READ_ONCE(ctx->descriptors[next_i].res_count);
                /*
                 * If the next descriptor is still empty, we must stop at this
                 * descriptor.
@@ -759,8 +758,7 @@ static unsigned int ar_search_last_active_buffer(struct ar_context *ctx,
                        if (MAX_AR_PACKET_SIZE > PAGE_SIZE && i != last) {
                                next_i = ar_next_buffer_index(next_i);
                                rmb();
-                               next_res_count = ACCESS_ONCE(
-                                       ctx->descriptors[next_i].res_count);
+                               next_res_count = READ_ONCE(ctx->descriptors[next_i].res_count);
                                if (next_res_count != cpu_to_le16(PAGE_SIZE))
                                        goto next_buffer_is_active;
                        }
@@ -2818,7 +2816,7 @@ static int handle_ir_buffer_fill(struct context *context,
        u32 buffer_dma;
 
        req_count = le16_to_cpu(last->req_count);
-       res_count = le16_to_cpu(ACCESS_ONCE(last->res_count));
+       res_count = le16_to_cpu(READ_ONCE(last->res_count));
        completed = req_count - res_count;
        buffer_dma = le32_to_cpu(last->data_address);