Skip to content

Commit

Permalink
soundwire: intel: Use auxiliary_device driver data helpers
Browse files Browse the repository at this point in the history
Use auxiliary_get_drvdata and auxiliary_set_drvdata helpers.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20211221235852.323752-3-david.e.box@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
David E. Box authored and Greg Kroah-Hartman committed Dec 22, 2021
1 parent 27963d3 commit 3edac08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions drivers/soundwire/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
bus->ops = &sdw_intel_ops;

/* set driver data, accessed by snd_soc_dai_get_drvdata() */
dev_set_drvdata(dev, cdns);
auxiliary_set_drvdata(auxdev, cdns);

/* use generic bandwidth allocation algorithm */
sdw->cdns.bus.compute_params = sdw_compute_params;
Expand Down Expand Up @@ -1321,7 +1321,7 @@ int intel_link_startup(struct auxiliary_device *auxdev)
{
struct sdw_cdns_stream_config config;
struct device *dev = &auxdev->dev;
struct sdw_cdns *cdns = dev_get_drvdata(dev);
struct sdw_cdns *cdns = auxiliary_get_drvdata(auxdev);
struct sdw_intel *sdw = cdns_to_intel(cdns);
struct sdw_bus *bus = &cdns->bus;
int link_flags;
Expand Down Expand Up @@ -1463,7 +1463,7 @@ int intel_link_startup(struct auxiliary_device *auxdev)
static void intel_link_remove(struct auxiliary_device *auxdev)
{
struct device *dev = &auxdev->dev;
struct sdw_cdns *cdns = dev_get_drvdata(dev);
struct sdw_cdns *cdns = auxiliary_get_drvdata(auxdev);
struct sdw_intel *sdw = cdns_to_intel(cdns);
struct sdw_bus *bus = &cdns->bus;

Expand All @@ -1488,7 +1488,7 @@ int intel_link_process_wakeen_event(struct auxiliary_device *auxdev)
void __iomem *shim;
u16 wake_sts;

sdw = dev_get_drvdata(dev);
sdw = auxiliary_get_drvdata(auxdev);
bus = &sdw->cdns.bus;

if (bus->prop.hw_disabled || !sdw->startup_done) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/soundwire/intel_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static struct sdw_intel_ctx
goto err;

link = &ldev->link_res;
link->cdns = dev_get_drvdata(&ldev->auxdev.dev);
link->cdns = auxiliary_get_drvdata(&ldev->auxdev);

if (!link->cdns) {
dev_err(&adev->dev, "failed to get link->cdns\n");
Expand Down

0 comments on commit 3edac08

Please sign in to comment.