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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C35200C.2040209@codeaurora.org>
Date:	Wed, 07 Jul 2010 17:47:08 -0700
From:	Patrick Pannuto <ppannuto@...eaurora.org>
To:	dbrownell@...rs.sourceforge.net, gregkh@...e.de,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
CC:	sboyd@...eaurora.org
Subject: [PATCH] usb: gadget: #include device.h in gadget.h

gadget.h uses structures defined in device.h, it must include it. In
most cases, gadget.h is preceded by linux/platform_device.h, but if
you are grouping headers sanely, device.h may not be pulled in until
*after* gadget (e.g. mach/msm_device.h), thus gadget.h should not
rely on something else #including device.h

include/linux/usb/gadget.h:488: error: field 'dev' has incomplete type
include/linux/usb/gadget.h: In function 'set_gadget_data':
include/linux/usb/gadget.h:492:
	error: implicit declaration of function 'dev_set_drvdata'
include/linux/usb/gadget.h: In function 'get_gadget_data':
include/linux/usb/gadget.h:494:
	error: implicit declaration of function 'dev_get_drvdata'
include/linux/usb/gadget.h:494:
	warning: return makes pointer from integer without a cast
include/linux/usb/gadget.h: At top level:
include/linux/usb/gadget.h:780: error: field 'driver' has incomplete type
In file included from include/linux/dmaengine.h:24,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:124,
                 from drivers/usb/gadget/u_ether.h:27,
                 from drivers/usb/gadget/android.c:37:
include/linux/device.h:494: error: conflicting types for 'dev_get_drvdata'
include/linux/usb/gadget.h:494:
	note: previous implicit declaration of 'dev_get_drvdata' was here
include/linux/device.h:495:
	warning: conflicting types for 'dev_set_drvdata'
include/linux/usb/gadget.h:492:
	note: previous implicit declaration of 'dev_set_drvdata' was here

Change-Id: Ia06309b76ac91fc305a1a50fb5e3469cb6adb623
Signed-off-by: Patrick Pannuto <ppannuto@...eaurora.org>
---
 include/linux/usb/gadget.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index bbf45d5..ddca035 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -15,6 +15,8 @@
 #ifndef __LINUX_USB_GADGET_H
 #define __LINUX_USB_GADGET_H
 
+#include <linux/device.h>
+
 struct usb_ep;
 
 /**
-- 
1.7.1

--
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