From patchwork Mon Oct 10 02:04:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Jakobi X-Patchwork-Id: 9368859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 178F76077E for ; Mon, 10 Oct 2016 02:04:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 040F828C12 for ; Mon, 10 Oct 2016 02:04:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC89D28C14; Mon, 10 Oct 2016 02:04:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D230228C12 for ; Mon, 10 Oct 2016 02:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbcJJCET (ORCPT ); Sun, 9 Oct 2016 22:04:19 -0400 Received: from smtp.math.uni-bielefeld.de ([129.70.45.10]:34808 "EHLO smtp.math.uni-bielefeld.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986AbcJJCES (ORCPT ); Sun, 9 Oct 2016 22:04:18 -0400 Received: from chidori.lan (unknown [5.146.177.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by smtp.math.uni-bielefeld.de (Postfix) with ESMTPSA id 3EC775F85F; Mon, 10 Oct 2016 04:04:12 +0200 (CEST) From: Tobias Jakobi To: linux-samsung-soc@vger.kernel.org Cc: krzk@kernel.org, s.nawrocki@samsung.com, Michael McConville , Tobias Jakobi Subject: [PATCH] ASoC: samsung: Minor simplification in i2s_set_fmt() Date: Mon, 10 Oct 2016 04:04:05 +0200 Message-Id: <1476065045-13865-1-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailer: git-send-email 2.7.3 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michael McConville We can replace the if-statement with the simpler bit toggle operation. Changes in v2: - add proper commit header and description Signed-off-by: Michael McConville Signed-off-by: Tobias Jakobi Reviewed-by: Sylwester Nawrocki --- sound/soc/samsung/i2s.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 50635ee..1c484ac 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -627,10 +627,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, case SND_SOC_DAIFMT_NB_NF: break; case SND_SOC_DAIFMT_NB_IF: - if (tmp & lrp_rlow) - tmp &= ~lrp_rlow; - else - tmp |= lrp_rlow; + tmp ^= lrp_rlow; break; default: dev_err(&i2s->pdev->dev, "Polarity not supported\n");