lkml.org 
[lkml]   [2018]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uapi: fix linux/usb/audio.h userspace compilation error
On Mon, 13 Aug 2018 17:46:51 +0200,
Dmitry V. Levin wrote:
>
> Replace NULL with 0 in uac_mixer_unit_bmControls() to fix the following
> linux/usb/audio.h userspace compilation error:
>
> /usr/include/linux/usb/audio.h: In function 'uac_mixer_unit_bmControls':
> /usr/include/linux/usb/audio.h:304:10: error: 'NULL' undeclared (first use in this function)
> return NULL;
>
> Fixes: 6cfd839ae78e ("ALSA: usb-audio: UAC3. Add support for mixer unit.")
> Cc: <stable@vger.kernel.org> # v4.18
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>

Hrm, can we include the standard header for definition of NULL
instead? It's way too ugly to use 0 just for that.


thanks,

Takashi

> ---
> include/uapi/linux/usb/audio.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h
> index 74e520fb944f..2b61fe34b2ca 100644
> --- a/include/uapi/linux/usb/audio.h
> +++ b/include/uapi/linux/usb/audio.h
> @@ -301,7 +301,7 @@ static inline __u8 *uac_mixer_unit_bmControls(struct uac_mixer_unit_descriptor *
> case UAC_VERSION_3:
> return &desc->baSourceID[desc->bNrInPins + 2];
> default:
> - return NULL;
> + return 0;
> }
> }
>
> --
> ldv
>

\
 
 \ /
  Last update: 2018-08-13 17:56    [W:0.037 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site