diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-04-04 05:51:08 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-04-04 05:51:08 -0400 |
commit | a99e31512aa435e8391ba5f5e64abeac9c5f2f32 (patch) | |
tree | 56bb9d9ccfe76520b672249757e25f686275b204 /sound/hda | |
parent | 86c8dd7f4da3fb3f92fc5ab5144c971639d39745 (diff) | |
parent | f03b24a851d32ca85dacab01785b24a7ee717d37 (diff) |
Merge branch 'for-linus' into for-next
Conflicts:
sound/hda/hdac_i915.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r-- | sound/hda/hdac_i915.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index d0da2508823e..6800e0c5a38f 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c | |||
@@ -287,6 +287,18 @@ int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops | |||
287 | } | 287 | } |
288 | EXPORT_SYMBOL_GPL(snd_hdac_i915_register_notifier); | 288 | EXPORT_SYMBOL_GPL(snd_hdac_i915_register_notifier); |
289 | 289 | ||
290 | /* check whether intel graphics is present */ | ||
291 | static bool i915_gfx_present(void) | ||
292 | { | ||
293 | static struct pci_device_id ids[] = { | ||
294 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_ANY_ID), | ||
295 | .class = PCI_BASE_CLASS_DISPLAY << 16, | ||
296 | .class_mask = 0xff << 16 }, | ||
297 | {} | ||
298 | }; | ||
299 | return pci_dev_present(ids); | ||
300 | } | ||
301 | |||
290 | /** | 302 | /** |
291 | * snd_hdac_i915_init - Initialize i915 audio component | 303 | * snd_hdac_i915_init - Initialize i915 audio component |
292 | * @bus: HDA core bus | 304 | * @bus: HDA core bus |
@@ -309,6 +321,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus) | |||
309 | if (WARN_ON(hdac_acomp)) | 321 | if (WARN_ON(hdac_acomp)) |
310 | return -EBUSY; | 322 | return -EBUSY; |
311 | 323 | ||
324 | if (!i915_gfx_present()) | ||
325 | return -ENODEV; | ||
326 | |||
312 | acomp = kzalloc(sizeof(*acomp), GFP_KERNEL); | 327 | acomp = kzalloc(sizeof(*acomp), GFP_KERNEL); |
313 | if (!acomp) | 328 | if (!acomp) |
314 | return -ENOMEM; | 329 | return -ENOMEM; |