diff mbox

[1/2,media] v4l2: SI476X MFD - Do not use binary constants

Message ID 1368044622-25645-1-git-send-email-geert@linux-m68k.org (mailing list archive)
State New, archived
Headers show

Commit Message

Geert Uytterhoeven May 8, 2013, 8:23 p.m. UTC
Gcc < 4.3 doesn't understand binary constanrs (0b*):

drivers/media/radio/radio-si476x.c:862:20: error: invalid suffix "b10000000" on integer constant

Hence use a hexadecimal constant (0x*) instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
---
 drivers/media/radio/radio-si476x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Andrey Smirnov May 13, 2013, 2:29 p.m. UTC | #1
On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Gcc < 4.3 doesn't understand binary constanrs (0b*):
>
> drivers/media/radio/radio-si476x.c:862:20: error: invalid suffix "b10000000" on integer constant
>
> Hence use a hexadecimal constant (0x*) instead.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: linux-media@vger.kernel.org

Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>

> ---
>  drivers/media/radio/radio-si476x.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
> index 9430c6a..9dc8baf 100644
> --- a/drivers/media/radio/radio-si476x.c
> +++ b/drivers/media/radio/radio-si476x.c
> @@ -44,7 +44,7 @@
>
>  #define FREQ_MUL (10000000 / 625)
>
> -#define SI476X_PHDIV_STATUS_LINK_LOCKED(status) (0b10000000 & (status))
> +#define SI476X_PHDIV_STATUS_LINK_LOCKED(status) (0x80 & (status))
>
>  #define DRIVER_NAME "si476x-radio"
>  #define DRIVER_CARD "SI476x AM/FM Receiver"
> --
> 1.7.0.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
index 9430c6a..9dc8baf 100644
--- a/drivers/media/radio/radio-si476x.c
+++ b/drivers/media/radio/radio-si476x.c
@@ -44,7 +44,7 @@ 
 
 #define FREQ_MUL (10000000 / 625)
 
-#define SI476X_PHDIV_STATUS_LINK_LOCKED(status) (0b10000000 & (status))
+#define SI476X_PHDIV_STATUS_LINK_LOCKED(status) (0x80 & (status))
 
 #define DRIVER_NAME "si476x-radio"
 #define DRIVER_CARD "SI476x AM/FM Receiver"