Skip to content

Commit 3edac08

Browse files
debox1gregkh
authored andcommitted
soundwire: intel: Use auxiliary_device driver data helpers
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>
1 parent 27963d3 commit 3edac08

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/soundwire/intel.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
12931293
bus->ops = &sdw_intel_ops;
12941294

12951295
/* set driver data, accessed by snd_soc_dai_get_drvdata() */
1296-
dev_set_drvdata(dev, cdns);
1296+
auxiliary_set_drvdata(auxdev, cdns);
12971297

12981298
/* use generic bandwidth allocation algorithm */
12991299
sdw->cdns.bus.compute_params = sdw_compute_params;
@@ -1321,7 +1321,7 @@ int intel_link_startup(struct auxiliary_device *auxdev)
13211321
{
13221322
struct sdw_cdns_stream_config config;
13231323
struct device *dev = &auxdev->dev;
1324-
struct sdw_cdns *cdns = dev_get_drvdata(dev);
1324+
struct sdw_cdns *cdns = auxiliary_get_drvdata(auxdev);
13251325
struct sdw_intel *sdw = cdns_to_intel(cdns);
13261326
struct sdw_bus *bus = &cdns->bus;
13271327
int link_flags;
@@ -1463,7 +1463,7 @@ int intel_link_startup(struct auxiliary_device *auxdev)
14631463
static void intel_link_remove(struct auxiliary_device *auxdev)
14641464
{
14651465
struct device *dev = &auxdev->dev;
1466-
struct sdw_cdns *cdns = dev_get_drvdata(dev);
1466+
struct sdw_cdns *cdns = auxiliary_get_drvdata(auxdev);
14671467
struct sdw_intel *sdw = cdns_to_intel(cdns);
14681468
struct sdw_bus *bus = &cdns->bus;
14691469

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

1491-
sdw = dev_get_drvdata(dev);
1491+
sdw = auxiliary_get_drvdata(auxdev);
14921492
bus = &sdw->cdns.bus;
14931493

14941494
if (bus->prop.hw_disabled || !sdw->startup_done) {

drivers/soundwire/intel_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static struct sdw_intel_ctx
244244
goto err;
245245

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

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

0 commit comments

Comments
 (0)