lkml.org 
[lkml]   [2008]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] spi.h uses/needs device.h
From: Randy Dunlap <randy.dunlap@oracle.com>

Include header files as used/needed:

In file included from mmotm-2008-1230-1605/drivers/leds/leds-dac124s085.c:16:
mmotm-2008-1230-1605/include/linux/spi/spi.h:66: error: field 'dev' has incomplete type
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'to_spi_device':
mmotm-2008-1230-1605/include/linux/spi/spi.h:100: warning: type defaults to 'int' in declaration of '__mptr'
mmotm-2008-1230-1605/include/linux/spi/spi.h:100: warning: initialization from incompatible pointer type
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_dev_get':
mmotm-2008-1230-1605/include/linux/spi/spi.h:106: error: implicit declaration of function 'get_device'
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_dev_put':
mmotm-2008-1230-1605/include/linux/spi/spi.h:112: error: implicit declaration of function 'put_device'
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_set_drvdata':
mmotm-2008-1230-1605/include/linux/spi/spi.h:130: error: implicit declaration of function 'dev_set_drvdata'
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_get_drvdata':
mmotm-2008-1230-1605/include/linux/spi/spi.h:135: error: implicit declaration of function 'dev_get_drvdata'
mmotm-2008-1230-1605/include/linux/spi/spi.h:135: warning: return makes pointer from integer without a cast
mmotm-2008-1230-1605/include/linux/spi/spi.h: At top level:
mmotm-2008-1230-1605/include/linux/spi/spi.h:172: error: expected declaration specifiers or '...' before 'pm_message_t'
mmotm-2008-1230-1605/include/linux/spi/spi.h:174: error: field 'driver' has incomplete type
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'to_spi_driver':
mmotm-2008-1230-1605/include/linux/spi/spi.h:179: warning: type defaults to 'int' in declaration of '__mptr'
mmotm-2008-1230-1605/include/linux/spi/spi.h:179: warning: initialization from incompatible pointer type
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_unregister_driver':
mmotm-2008-1230-1605/include/linux/spi/spi.h:192: error: implicit declaration of function 'driver_unregister'
mmotm-2008-1230-1605/include/linux/spi/spi.h: At top level:
mmotm-2008-1230-1605/include/linux/spi/spi.h:225: error: field 'dev' has incomplete type
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_master_get_devdata':
mmotm-2008-1230-1605/include/linux/spi/spi.h:271: warning: return makes pointer from integer without a cast
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_message_alloc':
mmotm-2008-1230-1605/include/linux/spi/spi.h:494: error: implicit declaration of function 'kzalloc'
mmotm-2008-1230-1605/include/linux/spi/spi.h:496: warning: assignment makes pointer from integer without a cast
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_message_free':
mmotm-2008-1230-1605/include/linux/spi/spi.h:510: error: implicit declaration of function 'kfree'
mmotm-2008-1230-1605/include/linux/spi/spi.h: In function 'spi_unregister_device':
mmotm-2008-1230-1605/include/linux/spi/spi.h:801: error: implicit declaration of function 'device_unregister'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: David Brownell <dbrownell@users.sourceforge.net>
---
include/linux/spi/spi.h | 2 ++
1 file changed, 2 insertions(+)

--- mmotm-2008-1230-1605.orig/include/linux/spi/spi.h
+++ mmotm-2008-1230-1605/include/linux/spi/spi.h
@@ -19,6 +19,8 @@
#ifndef __LINUX_SPI_H
#define __LINUX_SPI_H

+#include <linux/device.h>
+
/*
* INTERFACES between SPI master-side drivers and SPI infrastructure.
* (There's no SPI slave support for Linux yet...)

\
 
 \ /
  Last update: 2008-12-31 05:25    [W:2.142 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site