Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6437544 authored by Xiaojun Sang's avatar Xiaojun Sang
Browse files

ASoC: soc: change audio drivers to use %pK



Change all audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

CRs-Fixed: 1052832
Change-Id: I9ff5cf06b019c566973eb609bf5d37969b98d31d
Signed-off-by: default avatarXiaojun Sang <xsang@codeaurora.org>
parent 14f889c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6203,7 +6203,7 @@ static int msm8x16_wcd_spmi_probe(struct spmi_device *spmi)
	}


	dev_dbg(&spmi->dev, "%s(%d):start addr = 0x%pa\n",
	dev_dbg(&spmi->dev, "%s(%d):start addr = 0x%pK\n",
		__func__, __LINE__,  &wcd_resource->start);

	if (wcd_resource->start != TOMBAK_CORE_0_SPMI_ADDR)
+1 −1
Original line number Diff line number Diff line
@@ -2298,7 +2298,7 @@ int wcd_mbhc_start(struct wcd_mbhc *mbhc,
			schedule_delayed_work(&mbhc->mbhc_firmware_dwork,
				      usecs_to_jiffies(FW_READ_TIMEOUT));
		else
			pr_err("%s: Skipping to read mbhc fw, 0x%p %p\n",
			pr_err("%s: Skipping to read mbhc fw, 0x%pK %pK\n",
				 __func__, mbhc->mbhc_fw, mbhc->mbhc_cal);
	}
	pr_debug("%s: leave %d\n", __func__, rc);
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -4734,7 +4734,7 @@ static int taiko_set_channel_map(struct snd_soc_dai *dai,
	struct taiko_priv *taiko = snd_soc_codec_get_drvdata(dai->codec);
	struct wcd9xxx *core = dev_get_drvdata(dai->codec->dev->parent);
	if (!tx_slot || !rx_slot) {
		pr_err("%s: Invalid tx_slot=%p, rx_slot=%p\n", __func__,
		pr_err("%s: Invalid tx_slot=%pK, rx_slot=%pK\n", __func__,
			tx_slot, rx_slot);
		return -EINVAL;
	}
+6 −6
Original line number Diff line number Diff line
@@ -5314,7 +5314,7 @@ static int tomtom_set_channel_map(struct snd_soc_dai *dai,
	struct tomtom_priv *tomtom = snd_soc_codec_get_drvdata(dai->codec);
	struct wcd9xxx *core = dev_get_drvdata(dai->codec->dev->parent);
	if (!tx_slot || !rx_slot) {
		pr_err("%s: Invalid tx_slot=%p, rx_slot=%p\n",
		pr_err("%s: Invalid tx_slot=%pK, rx_slot=%pK\n",
			__func__, tx_slot, rx_slot);
		return -EINVAL;
	}
@@ -5359,7 +5359,7 @@ static int tomtom_get_channel_map(struct snd_soc_dai *dai,
	case AIF2_PB:
	case AIF3_PB:
		if (!rx_slot || !rx_num) {
			pr_err("%s: Invalid rx_slot %p or rx_num %p\n",
			pr_err("%s: Invalid rx_slot %pK or rx_num %pK\n",
				 __func__, rx_slot, rx_num);
			return -EINVAL;
		}
@@ -5378,7 +5378,7 @@ static int tomtom_get_channel_map(struct snd_soc_dai *dai,
	case AIF4_VIFEED:
	case AIF4_MAD_TX:
		if (!tx_slot || !tx_num) {
			pr_err("%s: Invalid tx_slot %p or tx_num %p\n",
			pr_err("%s: Invalid tx_slot %pK or tx_num %pK\n",
				 __func__, tx_slot, tx_num);
			return -EINVAL;
		}
@@ -8068,7 +8068,7 @@ static void tomtom_compute_impedance(struct wcd9xxx_mbhc *mbhc, s16 *l, s16 *r,
	struct tomtom_priv *tomtom;

	if (!mbhc) {
		pr_err("%s: Invalid parameters mbhc = %p\n",
		pr_err("%s: Invalid parameters mbhc = %pK\n",
			__func__,  mbhc);
		return;
	}
@@ -8127,7 +8127,7 @@ static void tomtom_zdet_error_approx(struct wcd9xxx_mbhc *mbhc, uint32_t *zl,
	const int shift = TOMTOM_ZDET_ERROR_APPROX_SHIFT;

	if (!zl || !zr || !mbhc) {
		pr_err("%s: Invalid parameters zl = %p zr = %p, mbhc = %p\n",
		pr_err("%s: Invalid parameters zl = %pK zr = %pK, mbhc = %pK\n",
			__func__, zl, zr, mbhc);
		return;
	}
@@ -8444,7 +8444,7 @@ static int tomtom_codec_fll_enable(struct snd_soc_codec *codec,
	struct wcd9xxx *wcd9xxx;

	if (!codec || !codec->control_data) {
		pr_err("%s: Invalid codec handle, %p\n",
		pr_err("%s: Invalid codec handle, %pK\n",
		       __func__, codec);
		return -EINVAL;
	}
+3 −3
Original line number Diff line number Diff line
@@ -10758,7 +10758,7 @@ static int tasha_get_channel_map(struct snd_soc_dai *dai,
	case AIF4_PB:
	case AIF_MIX1_PB:
		if (!rx_slot || !rx_num) {
			pr_err("%s: Invalid rx_slot %p or rx_num %p\n",
			pr_err("%s: Invalid rx_slot %pK or rx_num %pK\n",
				 __func__, rx_slot, rx_num);
			return -EINVAL;
		}
@@ -10777,7 +10777,7 @@ static int tasha_get_channel_map(struct snd_soc_dai *dai,
	case AIF4_MAD_TX:
	case AIF4_VIFEED:
		if (!tx_slot || !tx_num) {
			pr_err("%s: Invalid tx_slot %p or tx_num %p\n",
			pr_err("%s: Invalid tx_slot %pK or tx_num %pK\n",
				 __func__, tx_slot, tx_num);
			return -EINVAL;
		}
@@ -10815,7 +10815,7 @@ static int tasha_set_channel_map(struct snd_soc_dai *dai,
	core = dev_get_drvdata(dai->codec->dev->parent);

	if (!tx_slot || !rx_slot) {
		pr_err("%s: Invalid tx_slot=%p, rx_slot=%p\n",
		pr_err("%s: Invalid tx_slot=%pK, rx_slot=%pK\n",
			__func__, tx_slot, rx_slot);
		return -EINVAL;
	}
Loading