soundwire: mipi_disco: fix alignment issues
Use Linux style. In some cases parenthesis alignment is modified to keep the code readable. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
74a8d8022f
commit
31dba31297
|
@ -35,7 +35,8 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||||
int nval, i;
|
int nval, i;
|
||||||
|
|
||||||
device_property_read_u32(bus->dev,
|
device_property_read_u32(bus->dev,
|
||||||
"mipi-sdw-sw-interface-revision", &prop->revision);
|
"mipi-sdw-sw-interface-revision",
|
||||||
|
&prop->revision);
|
||||||
|
|
||||||
/* Find master handle */
|
/* Find master handle */
|
||||||
snprintf(name, sizeof(name),
|
snprintf(name, sizeof(name),
|
||||||
|
@ -56,7 +57,8 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||||
prop->clk_stop_mode |= SDW_CLK_STOP_MODE1;
|
prop->clk_stop_mode |= SDW_CLK_STOP_MODE1;
|
||||||
|
|
||||||
fwnode_property_read_u32(link,
|
fwnode_property_read_u32(link,
|
||||||
"mipi-sdw-max-clock-frequency", &prop->max_freq);
|
"mipi-sdw-max-clock-frequency",
|
||||||
|
&prop->max_freq);
|
||||||
|
|
||||||
nval = fwnode_property_read_u32_array(link,
|
nval = fwnode_property_read_u32_array(link,
|
||||||
"mipi-sdw-clock-frequencies-supported", NULL, 0);
|
"mipi-sdw-clock-frequencies-supported", NULL, 0);
|
||||||
|
@ -91,13 +93,15 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||||
|
|
||||||
prop->num_clk_gears = nval;
|
prop->num_clk_gears = nval;
|
||||||
prop->clk_gears = devm_kcalloc(bus->dev, prop->num_clk_gears,
|
prop->clk_gears = devm_kcalloc(bus->dev, prop->num_clk_gears,
|
||||||
sizeof(*prop->clk_gears), GFP_KERNEL);
|
sizeof(*prop->clk_gears),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!prop->clk_gears)
|
if (!prop->clk_gears)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
fwnode_property_read_u32_array(link,
|
fwnode_property_read_u32_array(link,
|
||||||
"mipi-sdw-supported-clock-gears",
|
"mipi-sdw-supported-clock-gears",
|
||||||
prop->clk_gears, prop->num_clk_gears);
|
prop->clk_gears,
|
||||||
|
prop->num_clk_gears);
|
||||||
}
|
}
|
||||||
|
|
||||||
fwnode_property_read_u32(link, "mipi-sdw-default-frame-rate",
|
fwnode_property_read_u32(link, "mipi-sdw-default-frame-rate",
|
||||||
|
@ -120,7 +124,8 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||||
EXPORT_SYMBOL(sdw_master_read_prop);
|
EXPORT_SYMBOL(sdw_master_read_prop);
|
||||||
|
|
||||||
static int sdw_slave_read_dp0(struct sdw_slave *slave,
|
static int sdw_slave_read_dp0(struct sdw_slave *slave,
|
||||||
struct fwnode_handle *port, struct sdw_dp0_prop *dp0)
|
struct fwnode_handle *port,
|
||||||
|
struct sdw_dp0_prop *dp0)
|
||||||
{
|
{
|
||||||
int nval;
|
int nval;
|
||||||
|
|
||||||
|
@ -146,20 +151,21 @@ static int sdw_slave_read_dp0(struct sdw_slave *slave,
|
||||||
dp0->words, dp0->num_words);
|
dp0->words, dp0->num_words);
|
||||||
}
|
}
|
||||||
|
|
||||||
dp0->flow_controlled = fwnode_property_read_bool(
|
dp0->flow_controlled = fwnode_property_read_bool(port,
|
||||||
port, "mipi-sdw-bra-flow-controlled");
|
"mipi-sdw-bra-flow-controlled");
|
||||||
|
|
||||||
dp0->simple_ch_prep_sm = fwnode_property_read_bool(
|
dp0->simple_ch_prep_sm = fwnode_property_read_bool(port,
|
||||||
port, "mipi-sdw-simplified-channel-prepare-sm");
|
"mipi-sdw-simplified-channel-prepare-sm");
|
||||||
|
|
||||||
dp0->device_interrupts = fwnode_property_read_bool(
|
dp0->device_interrupts = fwnode_property_read_bool(port,
|
||||||
port, "mipi-sdw-imp-def-dp0-interrupts-supported");
|
"mipi-sdw-imp-def-dp0-interrupts-supported");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sdw_slave_read_dpn(struct sdw_slave *slave,
|
static int sdw_slave_read_dpn(struct sdw_slave *slave,
|
||||||
struct sdw_dpn_prop *dpn, int count, int ports, char *type)
|
struct sdw_dpn_prop *dpn, int count, int ports,
|
||||||
|
char *type)
|
||||||
{
|
{
|
||||||
struct fwnode_handle *node;
|
struct fwnode_handle *node;
|
||||||
u32 bit, i = 0;
|
u32 bit, i = 0;
|
||||||
|
@ -195,7 +201,8 @@ static int sdw_slave_read_dpn(struct sdw_slave *slave,
|
||||||
dpn[i].num_words = nval;
|
dpn[i].num_words = nval;
|
||||||
dpn[i].words = devm_kcalloc(&slave->dev,
|
dpn[i].words = devm_kcalloc(&slave->dev,
|
||||||
dpn[i].num_words,
|
dpn[i].num_words,
|
||||||
sizeof(*dpn[i].words), GFP_KERNEL);
|
sizeof(*dpn[i].words),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!dpn[i].words)
|
if (!dpn[i].words)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -234,7 +241,8 @@ static int sdw_slave_read_dpn(struct sdw_slave *slave,
|
||||||
|
|
||||||
dpn[i].num_ch = nval;
|
dpn[i].num_ch = nval;
|
||||||
dpn[i].ch = devm_kcalloc(&slave->dev, dpn[i].num_ch,
|
dpn[i].ch = devm_kcalloc(&slave->dev, dpn[i].num_ch,
|
||||||
sizeof(*dpn[i].ch), GFP_KERNEL);
|
sizeof(*dpn[i].ch),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!dpn[i].ch)
|
if (!dpn[i].ch)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -348,7 +356,8 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
prop->dp0_prop = devm_kzalloc(&slave->dev,
|
prop->dp0_prop = devm_kzalloc(&slave->dev,
|
||||||
sizeof(*prop->dp0_prop), GFP_KERNEL);
|
sizeof(*prop->dp0_prop),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!prop->dp0_prop)
|
if (!prop->dp0_prop)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -364,7 +373,8 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
|
||||||
/* Allocate memory for set bits in port lists */
|
/* Allocate memory for set bits in port lists */
|
||||||
nval = hweight32(prop->source_ports);
|
nval = hweight32(prop->source_ports);
|
||||||
prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval,
|
prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval,
|
||||||
sizeof(*prop->src_dpn_prop), GFP_KERNEL);
|
sizeof(*prop->src_dpn_prop),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!prop->src_dpn_prop)
|
if (!prop->src_dpn_prop)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -374,7 +384,8 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
|
||||||
|
|
||||||
nval = hweight32(prop->sink_ports);
|
nval = hweight32(prop->sink_ports);
|
||||||
prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval,
|
prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval,
|
||||||
sizeof(*prop->sink_dpn_prop), GFP_KERNEL);
|
sizeof(*prop->sink_dpn_prop),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!prop->sink_dpn_prop)
|
if (!prop->sink_dpn_prop)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -388,7 +399,8 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
|
||||||
|
|
||||||
/* Allocate port_ready based on num_of_ports */
|
/* Allocate port_ready based on num_of_ports */
|
||||||
slave->port_ready = devm_kcalloc(&slave->dev, num_of_ports,
|
slave->port_ready = devm_kcalloc(&slave->dev, num_of_ports,
|
||||||
sizeof(*slave->port_ready), GFP_KERNEL);
|
sizeof(*slave->port_ready),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!slave->port_ready)
|
if (!slave->port_ready)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue