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

Commit 89438f3e authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

asoc: codecs: Update file names of bolero



Update file names of bolero to be compliance
to driver file name convention.

Change-Id: I138d0211803f93152ae7fb01eae68050dada082f
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 4cc52a2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
 */

#include <linux/regmap.h>
#include "bolero_cdc.h"
#include "bolero-cdc.h"
#include "internal.h"

static const struct reg_default bolero_defaults[] = {
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
 */

#include <linux/types.h>
#include "bolero_cdc.h"
#include "bolero-cdc.h"
#include "internal.h"

u8 bolero_tx_reg_access[BOLERO_CDC_TX_MACRO_MAX] = {
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@

#include <linux/kernel.h>
#include <linux/regmap.h>
#include "bolero_cdc.h"
#include "bolero-cdc.h"
#include "internal.h"

#define REG_BYTES 2
+13 −34
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>

#include "bolero_cdc.h"
#include "bolero-cdc.h"
#include "internal.h"

static struct snd_soc_codec_driver bolero;
@@ -441,9 +441,7 @@ static struct snd_soc_codec_driver bolero = {
static void bolero_add_child_devices(struct work_struct *work)
{
	struct bolero_priv *priv;
	struct platform_device *pdev;
	struct device_node *node;
	int ret, i, cnt = 0;
	int rc;

	priv = container_of(work, struct bolero_priv,
			    bolero_add_child_devices_work);
@@ -452,37 +450,17 @@ static void bolero_add_child_devices(struct work_struct *work)
			__func__);
		return;
	}
	if (!priv->dev->of_node) {
	if (!priv->dev || !priv->dev->of_node) {
		dev_err(priv->dev, "%s: DT node for bolero does not exist\n",
			__func__);
		return;
	}

	for_each_child_of_node(priv->dev->of_node, node) {
		pdev = platform_device_alloc(node->name, -1);
		if (!pdev) {
			dev_err(priv->dev, "%s: pdev memory alloc failed\n",
				__func__);
			ret = -ENOMEM;
			goto fail_pdev_add;
		}
		pdev->dev.parent = priv->dev;
		pdev->dev.of_node = node;

		ret = platform_device_add(pdev);
		if (ret) {
			dev_err(priv->dev,
				"%s: Cannot add platform device\n",
				__func__);
			goto fail_pdev_add;
		}
		priv->pdev_child_devices[cnt] = pdev;
		cnt++;
	}
	return;
fail_pdev_add:
	for (i = cnt; i > 0; i--)
		platform_device_put(priv->pdev_child_devices[i - 1]);
	rc = of_platform_populate(priv->dev->of_node, NULL, NULL, priv->dev);
	if (rc)
		dev_err(priv->dev, "%s: failed to add child nodes, rc=%d\n",
			__func__, rc);
	else
		dev_dbg(priv->dev, "%s: added child node\n", __func__);
}

static int bolero_probe(struct platform_device *pdev)
@@ -538,10 +516,11 @@ static int bolero_probe(struct platform_device *pdev)
static int bolero_remove(struct platform_device *pdev)
{
	struct bolero_priv *priv = dev_get_drvdata(&pdev->dev);
	u16 i;

	for (i = priv->child_num; i > 0; i--)
		platform_device_unregister(priv->pdev_child_devices[i - 1]);
	if (!priv)
		return -EINVAL;

	of_platform_depopulate(&pdev->dev);
	mutex_destroy(&priv->io_lock);
	mutex_destroy(&priv->clk_lock);
	return 0;
Loading