Re: [PATCH v2 4/5] ASoC: tpa6130a2: Add DAPM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 20-06-2016 16:44, Lars-Peter Clausen wrote:
+	/* before widget power up */
+	if (SND_SOC_DAPM_EVENT_ON(event)) {
+		/* Turn on the chip */
+		tpa6130a2_power(data, true);
+		/* Sync the registers */
+		ret = regcache_sync(data->regmap);
+		if (ret < 0) {
+			dev_err(c->dev, "Failed to initialize chip\n");
+			tpa6130a2_power(data, false);
+			return ret;
+		}
+	/* after widget power down */
+	} else
+		tpa6130a2_power(data, false);

checkpatch.pl should complain about this. Kernel code style is if one branch
has branches the other has to have it as well.


Weird, checkpatch.pl doesn't complain. I'll add the braces in v3, thank you for reviewing
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux