diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-27 18:24:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-27 18:24:53 -0400 |
commit | 23d88271b4f97f66de521ac9b2c1471e6311cf26 (patch) | |
tree | 631df9436c0c90c10f49263e9d9e9507e77698a7 | |
parent | 3d0aa366072a194c6a339d37b85d5b99e936097e (diff) | |
parent | 625faa6a720d26fc0db9e20b48dc0dfe4c8d8ddf (diff) |
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
"Two fixes for ARM and one for clkdev:
- Fix another build issue with vdsomunge on non-glibc systems
- Fix a randconfig build error caused by an invalid configuration
- Fix a clkdev problem causing the Nokia n700 to no longer boot"
* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
clkdev: fix clk_add_alias() with a NULL alias device name
ARM: 8445/1: fix vdsomunge not to depend on glibc specific byteswap.h
ARM: make RiscPC depend on MMU
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/vdso/vdsomunge.c | 17 | ||||
-rw-r--r-- | drivers/clk/clkdev.c | 3 |
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 72ad724c67ae..639411f73ca9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -645,6 +645,7 @@ config ARCH_SHMOBILE_LEGACY | |||
645 | 645 | ||
646 | config ARCH_RPC | 646 | config ARCH_RPC |
647 | bool "RiscPC" | 647 | bool "RiscPC" |
648 | depends on MMU | ||
648 | select ARCH_ACORN | 649 | select ARCH_ACORN |
649 | select ARCH_MAY_HAVE_PC_FDC | 650 | select ARCH_MAY_HAVE_PC_FDC |
650 | select ARCH_SPARSEMEM_ENABLE | 651 | select ARCH_SPARSEMEM_ENABLE |
diff --git a/arch/arm/vdso/vdsomunge.c b/arch/arm/vdso/vdsomunge.c index aedec81d1198..0cebd98cd88c 100644 --- a/arch/arm/vdso/vdsomunge.c +++ b/arch/arm/vdso/vdsomunge.c | |||
@@ -45,7 +45,6 @@ | |||
45 | * it does. | 45 | * it does. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #include <byteswap.h> | ||
49 | #include <elf.h> | 48 | #include <elf.h> |
50 | #include <errno.h> | 49 | #include <errno.h> |
51 | #include <fcntl.h> | 50 | #include <fcntl.h> |
@@ -59,6 +58,16 @@ | |||
59 | #include <sys/types.h> | 58 | #include <sys/types.h> |
60 | #include <unistd.h> | 59 | #include <unistd.h> |
61 | 60 | ||
61 | #define swab16(x) \ | ||
62 | ((((x) & 0x00ff) << 8) | \ | ||
63 | (((x) & 0xff00) >> 8)) | ||
64 | |||
65 | #define swab32(x) \ | ||
66 | ((((x) & 0x000000ff) << 24) | \ | ||
67 | (((x) & 0x0000ff00) << 8) | \ | ||
68 | (((x) & 0x00ff0000) >> 8) | \ | ||
69 | (((x) & 0xff000000) << 24)) | ||
70 | |||
62 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | 71 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
63 | #define HOST_ORDER ELFDATA2LSB | 72 | #define HOST_ORDER ELFDATA2LSB |
64 | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ | 73 | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ |
@@ -104,17 +113,17 @@ static void cleanup(void) | |||
104 | 113 | ||
105 | static Elf32_Word read_elf_word(Elf32_Word word, bool swap) | 114 | static Elf32_Word read_elf_word(Elf32_Word word, bool swap) |
106 | { | 115 | { |
107 | return swap ? bswap_32(word) : word; | 116 | return swap ? swab32(word) : word; |
108 | } | 117 | } |
109 | 118 | ||
110 | static Elf32_Half read_elf_half(Elf32_Half half, bool swap) | 119 | static Elf32_Half read_elf_half(Elf32_Half half, bool swap) |
111 | { | 120 | { |
112 | return swap ? bswap_16(half) : half; | 121 | return swap ? swab16(half) : half; |
113 | } | 122 | } |
114 | 123 | ||
115 | static void write_elf_word(Elf32_Word val, Elf32_Word *dst, bool swap) | 124 | static void write_elf_word(Elf32_Word val, Elf32_Word *dst, bool swap) |
116 | { | 125 | { |
117 | *dst = swap ? bswap_32(val) : val; | 126 | *dst = swap ? swab32(val) : val; |
118 | } | 127 | } |
119 | 128 | ||
120 | int main(int argc, char **argv) | 129 | int main(int argc, char **argv) |
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index c0eaf0973bd2..779b6ff0c7ad 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c | |||
@@ -333,7 +333,8 @@ int clk_add_alias(const char *alias, const char *alias_dev_name, | |||
333 | if (IS_ERR(r)) | 333 | if (IS_ERR(r)) |
334 | return PTR_ERR(r); | 334 | return PTR_ERR(r); |
335 | 335 | ||
336 | l = clkdev_create(r, alias, "%s", alias_dev_name); | 336 | l = clkdev_create(r, alias, alias_dev_name ? "%s" : NULL, |
337 | alias_dev_name); | ||
337 | clk_put(r); | 338 | clk_put(r); |
338 | 339 | ||
339 | return l ? 0 : -ENODEV; | 340 | return l ? 0 : -ENODEV; |