未验证 提交 2df0c4a6 编写于 作者: H Heikki Krogerus 提交者: Mark Brown

ARM: pxa: icontrol: Constify the software node

When device properties are supplied to the devices, in
reality a software fwnode that holds those properties is
created which is then assigned to the device. If the device
properties are constant the software node can also be
constant.
Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Link: https://lore.kernel.org/r/20210303152814.35070-3-heikki.krogerus@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 47afc77b
...@@ -74,13 +74,17 @@ static const struct property_entry mcp251x_properties[] = { ...@@ -74,13 +74,17 @@ static const struct property_entry mcp251x_properties[] = {
{} {}
}; };
static const struct software_node mcp251x_node = {
.properties = mcp251x_properties,
};
static struct spi_board_info mcp251x_board_info[] = { static struct spi_board_info mcp251x_board_info[] = {
{ {
.modalias = "mcp2515", .modalias = "mcp2515",
.max_speed_hz = 6500000, .max_speed_hz = 6500000,
.bus_num = 3, .bus_num = 3,
.chip_select = 0, .chip_select = 0,
.properties = mcp251x_properties, .swnode = &mcp251x_node,
.controller_data = &mcp251x_chip_info1, .controller_data = &mcp251x_chip_info1,
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ1) .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ1)
}, },
...@@ -89,7 +93,7 @@ static struct spi_board_info mcp251x_board_info[] = { ...@@ -89,7 +93,7 @@ static struct spi_board_info mcp251x_board_info[] = {
.max_speed_hz = 6500000, .max_speed_hz = 6500000,
.bus_num = 3, .bus_num = 3,
.chip_select = 1, .chip_select = 1,
.properties = mcp251x_properties, .swnode = &mcp251x_node,
.controller_data = &mcp251x_chip_info2, .controller_data = &mcp251x_chip_info2,
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2) .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2)
}, },
...@@ -98,7 +102,7 @@ static struct spi_board_info mcp251x_board_info[] = { ...@@ -98,7 +102,7 @@ static struct spi_board_info mcp251x_board_info[] = {
.max_speed_hz = 6500000, .max_speed_hz = 6500000,
.bus_num = 4, .bus_num = 4,
.chip_select = 0, .chip_select = 0,
.properties = mcp251x_properties, .swnode = &mcp251x_node,
.controller_data = &mcp251x_chip_info3, .controller_data = &mcp251x_chip_info3,
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3) .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3)
}, },
...@@ -107,7 +111,7 @@ static struct spi_board_info mcp251x_board_info[] = { ...@@ -107,7 +111,7 @@ static struct spi_board_info mcp251x_board_info[] = {
.max_speed_hz = 6500000, .max_speed_hz = 6500000,
.bus_num = 4, .bus_num = 4,
.chip_select = 1, .chip_select = 1,
.properties = mcp251x_properties, .swnode = &mcp251x_node,
.controller_data = &mcp251x_chip_info4, .controller_data = &mcp251x_chip_info4,
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4) .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册