diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/atomic.h | 8 | ||||
-rw-r--r-- | include/linux/hid-debug.h | 7 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 2 | ||||
-rw-r--r-- | include/linux/videodev2.h | 9 |
4 files changed, 19 insertions, 7 deletions
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index 53283e2540b3..f038e33e6d48 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h | |||
@@ -207,7 +207,8 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
207 | 207 | ||
208 | /* | 208 | /* |
209 | * Atomically test *v and decrement if it is greater than 0. | 209 | * Atomically test *v and decrement if it is greater than 0. |
210 | * The function returns the old value of *v minus 1. | 210 | * The function returns the old value of *v minus 1, even if |
211 | * the atomic variable, v, was not decremented. | ||
211 | */ | 212 | */ |
212 | static __inline__ int atomic_dec_if_positive(atomic_t *v) | 213 | static __inline__ int atomic_dec_if_positive(atomic_t *v) |
213 | { | 214 | { |
@@ -216,14 +217,15 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
216 | __asm__ __volatile__( | 217 | __asm__ __volatile__( |
217 | LWSYNC_ON_SMP | 218 | LWSYNC_ON_SMP |
218 | "1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ | 219 | "1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ |
219 | addic. %0,%0,-1\n\ | 220 | cmpwi %0,1\n\ |
221 | addi %0,%0,-1\n\ | ||
220 | blt- 2f\n" | 222 | blt- 2f\n" |
221 | PPC405_ERR77(0,%1) | 223 | PPC405_ERR77(0,%1) |
222 | " stwcx. %0,0,%1\n\ | 224 | " stwcx. %0,0,%1\n\ |
223 | bne- 1b" | 225 | bne- 1b" |
224 | ISYNC_ON_SMP | 226 | ISYNC_ON_SMP |
225 | "\n\ | 227 | "\n\ |
226 | 2:" : "=&r" (t) | 228 | 2:" : "=&b" (t) |
227 | : "r" (&v->counter) | 229 | : "r" (&v->counter) |
228 | : "cc", "memory"); | 230 | : "cc", "memory"); |
229 | 231 | ||
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h index f04d6d75c098..8e4dbb51fc70 100644 --- a/include/linux/hid-debug.h +++ b/include/linux/hid-debug.h | |||
@@ -700,9 +700,10 @@ static char *keys[KEY_MAX + 1] = { | |||
700 | 700 | ||
701 | static char *relatives[REL_MAX + 1] = { | 701 | static char *relatives[REL_MAX + 1] = { |
702 | [REL_X] = "X", [REL_Y] = "Y", | 702 | [REL_X] = "X", [REL_Y] = "Y", |
703 | [REL_Z] = "Z", [REL_HWHEEL] = "HWheel", | 703 | [REL_Z] = "Z", [REL_RX] = "Rx", |
704 | [REL_DIAL] = "Dial", [REL_WHEEL] = "Wheel", | 704 | [REL_RY] = "Ry", [REL_RZ] = "Rz", |
705 | [REL_MISC] = "Misc", | 705 | [REL_HWHEEL] = "HWheel", [REL_DIAL] = "Dial", |
706 | [REL_WHEEL] = "Wheel", [REL_MISC] = "Misc", | ||
706 | }; | 707 | }; |
707 | 708 | ||
708 | static char *absolutes[ABS_MAX + 1] = { | 709 | static char *absolutes[ABS_MAX + 1] = { |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index a3594dfd6963..bcf24909d677 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -42,7 +42,7 @@ struct mmc_command { | |||
42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC) | 45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
46 | 46 | ||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
48 | 48 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5cb380a559fd..d94e2683be52 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -662,6 +662,15 @@ typedef __u64 v4l2_std_id; | |||
662 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) | 662 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) |
663 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) | 663 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) |
664 | 664 | ||
665 | /* FIXME: | ||
666 | Although std_id is 64 bits, there is an issue on PPC32 architecture that | ||
667 | makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding | ||
668 | this value to 32 bits. | ||
669 | As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide), | ||
670 | it should work fine. However, if needed to add more than two standards, | ||
671 | v4l2-common.c should be fixed. | ||
672 | */ | ||
673 | |||
665 | /* some merged standards */ | 674 | /* some merged standards */ |
666 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) | 675 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) |
667 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) | 676 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) |