Commit 9b6d1b0c authored by Mark Brown's avatar Mark Brown

ASoC: codecs: do not store status in state containe

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Many SoundWire CODEC drivers store the device status in a member
variable in the driver data but never reference this, and in any case
the SoundWire core stores this information for drivers so it would be
redundant even if used.
parents cbbc0ec6 b932f21f
......@@ -304,9 +304,6 @@ static int rt1308_update_status(struct sdw_slave *slave,
{
struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt1308->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt1308->hw_init = false;
......@@ -314,7 +311,7 @@ static int rt1308_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt1308->hw_init || rt1308->status != SDW_SLAVE_ATTACHED)
if (rt1308->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -159,7 +159,6 @@ struct rt1308_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -323,9 +323,6 @@ static int rt1316_update_status(struct sdw_slave *slave,
{
struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt1316->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt1316->hw_init = false;
......@@ -333,7 +330,7 @@ static int rt1316_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt1316->hw_init || rt1316->status != SDW_SLAVE_ATTACHED)
if (rt1316->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -42,7 +42,6 @@ struct rt1316_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -456,9 +456,6 @@ static int rt1318_update_status(struct sdw_slave *slave,
{
struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt1318->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt1318->hw_init = false;
......@@ -466,7 +463,7 @@ static int rt1318_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt1318->hw_init || rt1318->status != SDW_SLAVE_ATTACHED)
if (rt1318->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -88,7 +88,6 @@ struct rt1318_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -500,9 +500,6 @@ static int rt5682_update_status(struct sdw_slave *slave,
{
struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt5682->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt5682->hw_init = false;
......@@ -510,7 +507,7 @@ static int rt5682_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt5682->hw_init || rt5682->status != SDW_SLAVE_ATTACHED)
if (rt5682->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -1440,7 +1440,6 @@ struct rt5682_priv {
bool disable_irq;
struct mutex calibrate_mutex;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -315,9 +315,6 @@ static int rt700_update_status(struct sdw_slave *slave,
{
struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt700->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt700->hw_init = false;
......@@ -325,7 +322,7 @@ static int rt700_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt700->hw_init || rt700->status != SDW_SLAVE_ATTACHED)
if (rt700->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -15,7 +15,6 @@ struct rt700_priv {
struct regmap *regmap;
struct regmap *sdw_regmap;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -143,9 +143,6 @@ static int rt711_sdca_update_status(struct sdw_slave *slave,
{
struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt711->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt711->hw_init = false;
......@@ -168,7 +165,7 @@ static int rt711_sdca_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED)
if (rt711->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -19,7 +19,6 @@ struct rt711_sdca_priv {
struct regmap *regmap, *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -319,9 +319,6 @@ static int rt711_update_status(struct sdw_slave *slave,
{
struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt711->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt711->hw_init = false;
......@@ -329,7 +326,7 @@ static int rt711_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED)
if (rt711->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -15,7 +15,6 @@ struct rt711_priv {
struct regmap *sdw_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -803,9 +803,6 @@ static int rt712_sdca_dmic_update_status(struct sdw_slave *slave,
{
struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt712->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt712->hw_init = false;
......@@ -813,7 +810,7 @@ static int rt712_sdca_dmic_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt712->hw_init || rt712->status != SDW_SLAVE_ATTACHED)
if (rt712->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -16,7 +16,6 @@ struct rt712_sdca_dmic_priv {
struct regmap *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -140,9 +140,6 @@ static int rt712_sdca_update_status(struct sdw_slave *slave,
{
struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt712->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt712->hw_init = false;
......@@ -165,7 +162,7 @@ static int rt712_sdca_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt712->hw_init || rt712->status != SDW_SLAVE_ATTACHED)
if (rt712->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -20,7 +20,6 @@ struct rt712_sdca_priv {
struct regmap *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -121,14 +121,11 @@ static int rt715_sdca_update_status(struct sdw_slave *slave,
{
struct rt715_sdca_priv *rt715 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt715->status = status;
/*
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED)
if (rt715->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -24,7 +24,6 @@ struct rt715_sdca_priv {
int dbg_nid;
int dbg_vid;
int dbg_payload;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -417,13 +417,11 @@ static int rt715_update_status(struct sdw_slave *slave,
{
struct rt715_priv *rt715 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt715->status = status;
/*
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED)
if (rt715->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -18,7 +18,6 @@ struct rt715_priv {
int dbg_nid;
int dbg_vid;
int dbg_payload;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
......@@ -163,9 +163,6 @@ static int rt722_sdca_update_status(struct sdw_slave *slave,
{
struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev);
/* Update the status */
rt722->status = status;
if (status == SDW_SLAVE_UNATTACHED)
rt722->hw_init = false;
......@@ -188,7 +185,7 @@ static int rt722_sdca_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
if (rt722->hw_init || rt722->status != SDW_SLAVE_ATTACHED)
if (rt722->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
......
......@@ -20,7 +20,6 @@ struct rt722_sdca_priv {
struct regmap *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment