aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r--drivers/firewire/core-transaction.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index da628c72a46..203e6428bad 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -810,8 +810,7 @@ static void handle_topology_map(struct fw_card *card, struct fw_request *request
810 int speed, unsigned long long offset, 810 int speed, unsigned long long offset,
811 void *payload, size_t length, void *callback_data) 811 void *payload, size_t length, void *callback_data)
812{ 812{
813 int i, start, end; 813 int start;
814 __be32 *map;
815 814
816 if (!TCODE_IS_READ_REQUEST(tcode)) { 815 if (!TCODE_IS_READ_REQUEST(tcode)) {
817 fw_send_response(card, request, RCODE_TYPE_ERROR); 816 fw_send_response(card, request, RCODE_TYPE_ERROR);
@@ -824,11 +823,7 @@ static void handle_topology_map(struct fw_card *card, struct fw_request *request
824 } 823 }
825 824
826 start = (offset - topology_map_region.start) / 4; 825 start = (offset - topology_map_region.start) / 4;
827 end = start + length / 4; 826 memcpy(payload, &card->topology_map[start], length);
828 map = payload;
829
830 for (i = 0; i < length / 4; i++)
831 map[i] = cpu_to_be32(card->topology_map[start + i]);
832 827
833 fw_send_response(card, request, RCODE_COMPLETE); 828 fw_send_response(card, request, RCODE_COMPLETE);
834} 829}