summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/common
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-01-14 21:57:20 +0100
committerMark Brown <broonie@kernel.org>2016-01-25 15:49:04 +0000
commit6f08cbdaac5a3050ea1898aef8ce326030fd1117 (patch)
tree4f35cf19695cdfea980e3c62497ed202e9c9c746 /sound/soc/intel/common
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
downloadlinux-6f08cbdaac5a3050ea1898aef8ce326030fd1117.tar.bz2
ASoC: Intel: Use acpi_dev_present()
Use shiny new acpi_dev_present() and remove all the boilerplate to search for a particular ACPI device. No functional change. Cf. 2d12b6b381ba ("ACPI / utils: Add acpi_dev_present()"). Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/common')
-rw-r--r--sound/soc/intel/common/sst-match-acpi.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sound/soc/intel/common/sst-match-acpi.c b/sound/soc/intel/common/sst-match-acpi.c
index dd077e116d25..c429e2226d40 100644
--- a/sound/soc/intel/common/sst-match-acpi.c
+++ b/sound/soc/intel/common/sst-match-acpi.c
@@ -13,29 +13,15 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
-#include <linux/acpi.h>
-#include <linux/device.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
#include "sst-acpi.h"
-static acpi_status sst_acpi_mach_match(acpi_handle handle, u32 level,
- void *context, void **ret)
-{
- *(bool *)context = true;
- return AE_OK;
-}
-
struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines)
{
struct sst_acpi_mach *mach;
- bool found = false;
for (mach = machines; mach->id[0]; mach++)
- if (ACPI_SUCCESS(acpi_get_devices(mach->id,
- sst_acpi_mach_match,
- &found, NULL)) && found)
+ if (acpi_dev_present(mach->id))
return mach;
return NULL;