Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Fix endianess issue in the ath3k driver

The version is always in little endian format. This patch makes the
driver work on both little and big endian CPUs.

Signed-off-by: Peng Chen <pengchen@qca.qualcomm.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

authored by

Peng Chen and committed by
Johan Hedberg
b9e2535a 2606ecbc

+2 -2
+2 -2
drivers/bluetooth/ath3k.c
··· 367 367 } 368 368 369 369 snprintf(filename, ATH3K_NAME_LEN, "ar3k/AthrBT_0x%08x.dfu", 370 - fw_version.rom_version); 370 + le32_to_cpu(fw_version.rom_version)); 371 371 372 372 ret = request_firmware(&firmware, filename, &udev->dev); 373 373 if (ret < 0) { ··· 429 429 } 430 430 431 431 snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s", 432 - fw_version.rom_version, clk_value, ".dfu"); 432 + le32_to_cpu(fw_version.rom_version), clk_value, ".dfu"); 433 433 434 434 ret = request_firmware(&firmware, filename, &udev->dev); 435 435 if (ret < 0) {