summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_i915.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2015-01-08 16:54:16 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-12 02:48:22 +0100
commit926981ae3325257d0bffcf7ff7ba359edb4fd7e8 (patch)
tree173ba54d4e0c7a69d78e1ba1ffc90efe99b1a3d6 /sound/pci/hda/hda_i915.c
parentALSA: hda: export struct hda_intel (diff)
downloadlinux-926981ae3325257d0bffcf7ff7ba359edb4fd7e8.tar.xz
linux-926981ae3325257d0bffcf7ff7ba359edb4fd7e8.zip
ALSA: hda: pass intel_hda to all i915 interface functions
chip is already passed to most of the i915 interface functions. Unify the interface by passing intel_hda instead of chip and passing it to all functions. Passing intel_hda instead of chip makes more sense since this is an intel specific interface. Also in an upcoming patch we will use intel_hda in all of these functions so by passing intel_hda we can save on some pointer casts from chip to intel_hda. This will be needed by an upcoming patch adding component support. No functional change. v2-3: unchanged v4: - pass intel_hda instead of chip Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'sound/pci/hda/hda_i915.c')
-rw-r--r--sound/pci/hda/hda_i915.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_i915.c b/sound/pci/hda/hda_i915.c
index 6a7854d8f2d9..66acd09f5da1 100644
--- a/sound/pci/hda/hda_i915.c
+++ b/sound/pci/hda/hda_i915.c
@@ -35,7 +35,7 @@ static int (*get_power)(void);
static int (*put_power)(void);
static int (*get_cdclk)(void);
-int hda_display_power(bool enable)
+int hda_display_power(struct hda_intel *hda, bool enable)
{
if (!get_power || !put_power)
return -ENODEV;
@@ -48,7 +48,7 @@ int hda_display_power(bool enable)
return put_power();
}
-void haswell_set_bclk(struct azx *chip)
+void haswell_set_bclk(struct hda_intel *hda)
{
int cdclk_freq;
unsigned int bclk_m, bclk_n;
@@ -80,12 +80,12 @@ void haswell_set_bclk(struct azx *chip)
break;
}
- azx_writew(chip, EM4, bclk_m);
- azx_writew(chip, EM5, bclk_n);
+ azx_writew(&hda->chip, EM4, bclk_m);
+ azx_writew(&hda->chip, EM5, bclk_n);
}
-int hda_i915_init(void)
+int hda_i915_init(struct hda_intel *hda)
{
int err = 0;
@@ -111,7 +111,7 @@ int hda_i915_init(void)
return err;
}
-int hda_i915_exit(void)
+int hda_i915_exit(struct hda_intel *hda)
{
if (get_power) {
symbol_put(i915_request_power_well);