From: Daeseok Youn <daeseok.youn@gmail.com>
To: mchehab@kernel.org
Cc: gregkh@linuxfoundation.org, daeseok.youn@gmail.com,
alan@linux.intel.com, dan.carpenter@oracle.com,
singhalsimran0@gmail.com, linux-media@vger.kernel.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()
Date: Thu, 30 Mar 2017 15:24:49 +0900 [thread overview]
Message-ID: <20170330062449.GA25214@SEL-JYOUN-D1> (raw)
The condition line in if-statement is needed to be shorthen to
improve readability.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
index 94bc793..eebfccd 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
@@ -255,14 +255,17 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
struct atomisp_freq_scaling_rule curr_rules;
int i, ret;
unsigned short fps = 0;
+ unsigned short masked_dev = 0;
if (isp->sw_contex.power_state != ATOM_ISP_POWER_UP) {
dev_err(isp->dev, "DFS cannot proceed due to no power.\n");
return -EINVAL;
}
- if ((isp->pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
- ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
+ masked_dev = isp->pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK;
+
+ if (masked_dev == ATOMISP_PCI_DEVICE_SOC_CHT &&
+ ATOMISP_USE_YUVPP(asd))
isp->dfs = &dfs_config_cht_soc;
if (isp->dfs->lowest_freq == 0 || isp->dfs->max_freq_at_vmin == 0 ||
--
1.9.1
next reply other threads:[~2017-03-30 6:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 6:24 Daeseok Youn [this message]
2017-03-30 10:52 ` [PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling() Alan Cox
2017-03-30 15:39 ` DaeSeok Youn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170330062449.GA25214@SEL-JYOUN-D1 \
--to=daeseok.youn@gmail.com \
--cc=alan@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=singhalsimran0@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox