lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FB7AB4D.5040900@mvista.com>
Date:	Sat, 19 May 2012 18:16:45 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Randy Dunlap <rdunlap@...otime.net>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Ian Abbott <abbotti@....co.uk>,
	Frank Mori Hess <fmhess@...rs.sourceforge.net>,
	devel@...verdev.osuosl.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH -next] usb: add usb.h stubs for CONFIG_USB not enabled

Hello.

On 19-05-2012 6:04, Randy Dunlap wrote:

> From: Randy Dunlap<rdunlap@...otime.net>

> Add stubs for some usb core functions when CONFIG_USB
> is not enabled.  This fixes these comedi build errors:

> ERROR: "usb_deregister" [drivers/staging/comedi/comedi.ko] undefined!
> ERROR: "usb_register_driver" [drivers/staging/comedi/comedi.ko] undefined!

> Signed-off-by: Randy Dunlap<rdunlap@...otime.net>
> ---
> I am only adding the stubs that are needed for comedi to build.
> I expect that more stubs will be needed as more build errors are
> found.  It seems to me that linux/usb.h might need more (major)
> moving of lines to support more stubs in the future.

>   Documentation/usb/error-codes.txt |    2 ++
>   include/linux/usb.h               |   24 +++++++++++++++++++++++-
>   2 files changed, 25 insertions(+), 1 deletion(-)
>
> --- linux-next-20120518.orig/include/linux/usb.h
> +++ linux-next-20120518/include/linux/usb.h
> @@ -10,7 +10,7 @@
>
>   #ifdef __KERNEL__
>
> -#include<linux/errno.h>         /* for -ENODEV */
> +#include<linux/errno.h>         /* for -ENODEV, -ENOSYS */
>   #include<linux/delay.h>	/* for mdelay() */
>   #include<linux/interrupt.h>	/* for in_interrupt() */
>   #include<linux/list.h>		/* for struct list_head */
> @@ -515,6 +515,8 @@ static inline struct usb_device *interfa
>   	return to_usb_device(intf->dev.parent);
>   }
>
> +#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)

    You can use IS_ENABLED(CONFIG_USB) instead of these two now.

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ