Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9bde36af
Commit
9bde36af
authored
Feb 22, 2011
by
Grant Likely
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devicetree/next' into spi/next
To pick up removal of #ifdef around .of_match_table
parents
f020c39e
c9e358df
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
8 additions
and
43 deletions
+8
-43
drivers/i2c/busses/i2c-ocores.c
drivers/i2c/busses/i2c-ocores.c
+3
-11
drivers/i2c/i2c-core.c
drivers/i2c/i2c-core.c
+0
-2
drivers/mmc/host/mmc_spi.c
drivers/mmc/host/mmc_spi.c
+0
-4
drivers/net/ethoc.c
drivers/net/ethoc.c
+1
-7
drivers/spi/pxa2xx_spi.c
drivers/spi/pxa2xx_spi.c
+0
-2
drivers/spi/pxa2xx_spi_pci.c
drivers/spi/pxa2xx_spi_pci.c
+0
-2
drivers/spi/xilinx_spi.c
drivers/spi/xilinx_spi.c
+0
-6
include/linux/device.h
include/linux/device.h
+2
-5
include/linux/i2c.h
include/linux/i2c.h
+0
-2
include/linux/of.h
include/linux/of.h
+2
-2
No files found.
drivers/i2c/busses/i2c-ocores.c
View file @
9bde36af
...
@@ -330,9 +330,7 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)
...
@@ -330,9 +330,7 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)
i2c
->
adap
=
ocores_adapter
;
i2c
->
adap
=
ocores_adapter
;
i2c_set_adapdata
(
&
i2c
->
adap
,
i2c
);
i2c_set_adapdata
(
&
i2c
->
adap
,
i2c
);
i2c
->
adap
.
dev
.
parent
=
&
pdev
->
dev
;
i2c
->
adap
.
dev
.
parent
=
&
pdev
->
dev
;
#ifdef CONFIG_OF
i2c
->
adap
.
dev
.
of_node
=
pdev
->
dev
.
of_node
;
i2c
->
adap
.
dev
.
of_node
=
pdev
->
dev
.
of_node
;
#endif
/* add i2c adapter to i2c tree */
/* add i2c adapter to i2c tree */
ret
=
i2c_add_adapter
(
&
i2c
->
adap
);
ret
=
i2c_add_adapter
(
&
i2c
->
adap
);
...
@@ -390,15 +388,11 @@ static int ocores_i2c_resume(struct platform_device *pdev)
...
@@ -390,15 +388,11 @@ static int ocores_i2c_resume(struct platform_device *pdev)
#define ocores_i2c_resume NULL
#define ocores_i2c_resume NULL
#endif
#endif
#ifdef CONFIG_OF
static
struct
of_device_id
ocores_i2c_match
[]
=
{
static
struct
of_device_id
ocores_i2c_match
[]
=
{
{
{
.
compatible
=
"opencores,i2c-ocores"
,
},
.
compatible
=
"opencores,i2c-ocores"
,
},
{},
{},
};
};
MODULE_DEVICE_TABLE
(
of
,
ocores_i2c_match
);
MODULE_DEVICE_TABLE
(
of
,
ocores_i2c_match
);
#endif
/* work with hotplug and coldplug */
/* work with hotplug and coldplug */
MODULE_ALIAS
(
"platform:ocores-i2c"
);
MODULE_ALIAS
(
"platform:ocores-i2c"
);
...
@@ -411,9 +405,7 @@ static struct platform_driver ocores_i2c_driver = {
...
@@ -411,9 +405,7 @@ static struct platform_driver ocores_i2c_driver = {
.
driver
=
{
.
driver
=
{
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
name
=
"ocores-i2c"
,
.
name
=
"ocores-i2c"
,
#ifdef CONFIG_OF
.
of_match_table
=
ocores_i2c_match
,
.
of_match_table
=
ocores_i2c_match
,
#endif
},
},
};
};
...
...
drivers/i2c/i2c-core.c
View file @
9bde36af
...
@@ -537,9 +537,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
...
@@ -537,9 +537,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
client
->
dev
.
parent
=
&
client
->
adapter
->
dev
;
client
->
dev
.
parent
=
&
client
->
adapter
->
dev
;
client
->
dev
.
bus
=
&
i2c_bus_type
;
client
->
dev
.
bus
=
&
i2c_bus_type
;
client
->
dev
.
type
=
&
i2c_client_type
;
client
->
dev
.
type
=
&
i2c_client_type
;
#ifdef CONFIG_OF
client
->
dev
.
of_node
=
info
->
of_node
;
client
->
dev
.
of_node
=
info
->
of_node
;
#endif
dev_set_name
(
&
client
->
dev
,
"%d-%04x"
,
i2c_adapter_id
(
adap
),
dev_set_name
(
&
client
->
dev
,
"%d-%04x"
,
i2c_adapter_id
(
adap
),
client
->
addr
);
client
->
addr
);
...
...
drivers/mmc/host/mmc_spi.c
View file @
9bde36af
...
@@ -1516,21 +1516,17 @@ static int __devexit mmc_spi_remove(struct spi_device *spi)
...
@@ -1516,21 +1516,17 @@ static int __devexit mmc_spi_remove(struct spi_device *spi)
return
0
;
return
0
;
}
}
#if defined(CONFIG_OF)
static
struct
of_device_id
mmc_spi_of_match_table
[]
__devinitdata
=
{
static
struct
of_device_id
mmc_spi_of_match_table
[]
__devinitdata
=
{
{
.
compatible
=
"mmc-spi-slot"
,
},
{
.
compatible
=
"mmc-spi-slot"
,
},
{},
{},
};
};
#endif
static
struct
spi_driver
mmc_spi_driver
=
{
static
struct
spi_driver
mmc_spi_driver
=
{
.
driver
=
{
.
driver
=
{
.
name
=
"mmc_spi"
,
.
name
=
"mmc_spi"
,
.
bus
=
&
spi_bus_type
,
.
bus
=
&
spi_bus_type
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
#if defined(CONFIG_OF)
.
of_match_table
=
mmc_spi_of_match_table
,
.
of_match_table
=
mmc_spi_of_match_table
,
#endif
},
},
.
probe
=
mmc_spi_probe
,
.
probe
=
mmc_spi_probe
,
.
remove
=
__devexit_p
(
mmc_spi_remove
),
.
remove
=
__devexit_p
(
mmc_spi_remove
),
...
...
drivers/net/ethoc.c
View file @
9bde36af
...
@@ -1163,15 +1163,11 @@ static int ethoc_resume(struct platform_device *pdev)
...
@@ -1163,15 +1163,11 @@ static int ethoc_resume(struct platform_device *pdev)
# define ethoc_resume NULL
# define ethoc_resume NULL
#endif
#endif
#ifdef CONFIG_OF
static
struct
of_device_id
ethoc_match
[]
=
{
static
struct
of_device_id
ethoc_match
[]
=
{
{
{
.
compatible
=
"opencores,ethoc"
,
},
.
compatible
=
"opencores,ethoc"
,
},
{},
{},
};
};
MODULE_DEVICE_TABLE
(
of
,
ethoc_match
);
MODULE_DEVICE_TABLE
(
of
,
ethoc_match
);
#endif
static
struct
platform_driver
ethoc_driver
=
{
static
struct
platform_driver
ethoc_driver
=
{
.
probe
=
ethoc_probe
,
.
probe
=
ethoc_probe
,
...
@@ -1181,9 +1177,7 @@ static struct platform_driver ethoc_driver = {
...
@@ -1181,9 +1177,7 @@ static struct platform_driver ethoc_driver = {
.
driver
=
{
.
driver
=
{
.
name
=
"ethoc"
,
.
name
=
"ethoc"
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
#ifdef CONFIG_OF
.
of_match_table
=
ethoc_match
,
.
of_match_table
=
ethoc_match
,
#endif
},
},
};
};
...
...
drivers/spi/pxa2xx_spi.c
View file @
9bde36af
...
@@ -1557,9 +1557,7 @@ static int __devinit pxa2xx_spi_probe(struct platform_device *pdev)
...
@@ -1557,9 +1557,7 @@ static int __devinit pxa2xx_spi_probe(struct platform_device *pdev)
drv_data
->
ssp
=
ssp
;
drv_data
->
ssp
=
ssp
;
master
->
dev
.
parent
=
&
pdev
->
dev
;
master
->
dev
.
parent
=
&
pdev
->
dev
;
#ifdef CONFIG_OF
master
->
dev
.
of_node
=
pdev
->
dev
.
of_node
;
master
->
dev
.
of_node
=
pdev
->
dev
.
of_node
;
#endif
/* the spi->mode bits understood by this driver: */
/* the spi->mode bits understood by this driver: */
master
->
mode_bits
=
SPI_CPOL
|
SPI_CPHA
|
SPI_CS_HIGH
;
master
->
mode_bits
=
SPI_CPOL
|
SPI_CPHA
|
SPI_CS_HIGH
;
...
...
drivers/spi/pxa2xx_spi_pci.c
View file @
9bde36af
...
@@ -98,9 +98,7 @@ static int __devinit ce4100_spi_probe(struct pci_dev *dev,
...
@@ -98,9 +98,7 @@ static int __devinit ce4100_spi_probe(struct pci_dev *dev,
pdev
->
dev
.
parent
=
&
dev
->
dev
;
pdev
->
dev
.
parent
=
&
dev
->
dev
;
pdev
->
dev
.
platform_data
=
&
spi_info
->
spi_pdata
;
pdev
->
dev
.
platform_data
=
&
spi_info
->
spi_pdata
;
#ifdef CONFIG_OF
pdev
->
dev
.
of_node
=
dev
->
dev
.
of_node
;
pdev
->
dev
.
of_node
=
dev
->
dev
.
of_node
;
#endif
pdev
->
dev
.
release
=
plat_dev_release
;
pdev
->
dev
.
release
=
plat_dev_release
;
spi_pdata
->
num_chipselect
=
dev
->
devfn
;
spi_pdata
->
num_chipselect
=
dev
->
devfn
;
...
...
drivers/spi/xilinx_spi.c
View file @
9bde36af
...
@@ -351,14 +351,12 @@ static irqreturn_t xilinx_spi_irq(int irq, void *dev_id)
...
@@ -351,14 +351,12 @@ static irqreturn_t xilinx_spi_irq(int irq, void *dev_id)
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
#ifdef CONFIG_OF
static
const
struct
of_device_id
xilinx_spi_of_match
[]
=
{
static
const
struct
of_device_id
xilinx_spi_of_match
[]
=
{
{
.
compatible
=
"xlnx,xps-spi-2.00.a"
,
},
{
.
compatible
=
"xlnx,xps-spi-2.00.a"
,
},
{
.
compatible
=
"xlnx,xps-spi-2.00.b"
,
},
{
.
compatible
=
"xlnx,xps-spi-2.00.b"
,
},
{}
{}
};
};
MODULE_DEVICE_TABLE
(
of
,
xilinx_spi_of_match
);
MODULE_DEVICE_TABLE
(
of
,
xilinx_spi_of_match
);
#endif
struct
spi_master
*
xilinx_spi_init
(
struct
device
*
dev
,
struct
resource
*
mem
,
struct
spi_master
*
xilinx_spi_init
(
struct
device
*
dev
,
struct
resource
*
mem
,
u32
irq
,
s16
bus_num
,
int
num_cs
,
int
little_endian
,
int
bits_per_word
)
u32
irq
,
s16
bus_num
,
int
num_cs
,
int
little_endian
,
int
bits_per_word
)
...
@@ -394,9 +392,7 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem,
...
@@ -394,9 +392,7 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem,
master
->
bus_num
=
bus_num
;
master
->
bus_num
=
bus_num
;
master
->
num_chipselect
=
num_cs
;
master
->
num_chipselect
=
num_cs
;
#ifdef CONFIG_OF
master
->
dev
.
of_node
=
dev
->
of_node
;
master
->
dev
.
of_node
=
dev
->
of_node
;
#endif
xspi
->
mem
=
*
mem
;
xspi
->
mem
=
*
mem
;
xspi
->
irq
=
irq
;
xspi
->
irq
=
irq
;
...
@@ -539,9 +535,7 @@ static struct platform_driver xilinx_spi_driver = {
...
@@ -539,9 +535,7 @@ static struct platform_driver xilinx_spi_driver = {
.
driver
=
{
.
driver
=
{
.
name
=
XILINX_SPI_NAME
,
.
name
=
XILINX_SPI_NAME
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
#ifdef CONFIG_OF
.
of_match_table
=
xilinx_spi_of_match
,
.
of_match_table
=
xilinx_spi_of_match
,
#endif
},
},
};
};
...
...
include/linux/device.h
View file @
9bde36af
...
@@ -128,9 +128,7 @@ struct device_driver {
...
@@ -128,9 +128,7 @@ struct device_driver {
bool
suppress_bind_attrs
;
/* disables bind/unbind via sysfs */
bool
suppress_bind_attrs
;
/* disables bind/unbind via sysfs */
#if defined(CONFIG_OF)
const
struct
of_device_id
*
of_match_table
;
const
struct
of_device_id
*
of_match_table
;
#endif
int
(
*
probe
)
(
struct
device
*
dev
);
int
(
*
probe
)
(
struct
device
*
dev
);
int
(
*
remove
)
(
struct
device
*
dev
);
int
(
*
remove
)
(
struct
device
*
dev
);
...
@@ -441,9 +439,8 @@ struct device {
...
@@ -441,9 +439,8 @@ struct device {
override */
override */
/* arch specific additions */
/* arch specific additions */
struct
dev_archdata
archdata
;
struct
dev_archdata
archdata
;
#ifdef CONFIG_OF
struct
device_node
*
of_node
;
struct
device_node
*
of_node
;
/* associated device tree node */
#endif
dev_t
devt
;
/* dev_t, creates the sysfs "dev" */
dev_t
devt
;
/* dev_t, creates the sysfs "dev" */
...
...
include/linux/i2c.h
View file @
9bde36af
...
@@ -258,9 +258,7 @@ struct i2c_board_info {
...
@@ -258,9 +258,7 @@ struct i2c_board_info {
unsigned
short
addr
;
unsigned
short
addr
;
void
*
platform_data
;
void
*
platform_data
;
struct
dev_archdata
*
archdata
;
struct
dev_archdata
*
archdata
;
#ifdef CONFIG_OF
struct
device_node
*
of_node
;
struct
device_node
*
of_node
;
#endif
int
irq
;
int
irq
;
};
};
...
...
include/linux/of.h
View file @
9bde36af
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
#include <asm/byteorder.h>
#include <asm/byteorder.h>
#ifdef CONFIG_OF
typedef
u32
phandle
;
typedef
u32
phandle
;
typedef
u32
ihandle
;
typedef
u32
ihandle
;
...
@@ -65,6 +63,8 @@ struct device_node {
...
@@ -65,6 +63,8 @@ struct device_node {
#endif
#endif
};
};
#ifdef CONFIG_OF
/* Pointer for first entry in chain of all nodes. */
/* Pointer for first entry in chain of all nodes. */
extern
struct
device_node
*
allnodes
;
extern
struct
device_node
*
allnodes
;
extern
struct
device_node
*
of_chosen
;
extern
struct
device_node
*
of_chosen
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment