From: Chanho Park <chanho61.park@samsung.com>
To: Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E . J . Bottomley" <jejb@linux.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Bean Huo <beanhuo@micron.com>,
Bart Van Assche <bvanassche@acm.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Christoph Hellwig <hch@infradead.org>,
Can Guo <cang@codeaurora.org>, Jaegeuk Kim <jaegeuk@kernel.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
Gyunghoon Kwon <goodjob.kwon@samsung.com>,
Sowon Na <sowon.na@samsung.com>,
linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org,
Chanho Park <chanho61.park@samsung.com>
Subject: [PATCH v5 04/15] scsi: ufs: ufs-exynos: simplify drv_data retrieval
Date: Mon, 18 Oct 2021 21:42:05 +0900 [thread overview]
Message-ID: <20211018124216.153072-5-chanho61.park@samsung.com> (raw)
In-Reply-To: <20211018124216.153072-1-chanho61.park@samsung.com>
The compatible field of exynos_ufs_drv_data is not necessary because
of_device_id already has it. Thus, we don't need it anymore and we can
get drv_data by device_get_match_data.
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
drivers/scsi/ufs/ufs-exynos.c | 10 +---------
drivers/scsi/ufs/ufs-exynos.h | 3 +--
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
index 30d0c1aba0c7..57210114ca0a 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -893,17 +893,10 @@ static int exynos_ufs_post_link(struct ufs_hba *hba)
static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs *ufs)
{
struct device_node *np = dev->of_node;
- struct exynos_ufs_drv_data *drv_data = &exynos_ufs_drvs;
struct exynos_ufs_uic_attr *attr;
int ret = 0;
- while (drv_data->compatible) {
- if (of_device_is_compatible(np, drv_data->compatible)) {
- ufs->drv_data = drv_data;
- break;
- }
- drv_data++;
- }
+ ufs->drv_data = device_get_match_data(dev);
if (ufs->drv_data && ufs->drv_data->uic_attr) {
attr = ufs->drv_data->uic_attr;
@@ -1262,7 +1255,6 @@ static struct exynos_ufs_uic_attr exynos7_uic_attr = {
};
static struct exynos_ufs_drv_data exynos_ufs_drvs = {
- .compatible = "samsung,exynos7-ufs",
.uic_attr = &exynos7_uic_attr,
.quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN |
UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR |
diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h
index 0a31f77a5f48..2e72aabaa673 100644
--- a/drivers/scsi/ufs/ufs-exynos.h
+++ b/drivers/scsi/ufs/ufs-exynos.h
@@ -142,7 +142,6 @@ struct exynos_ufs_uic_attr {
};
struct exynos_ufs_drv_data {
- char *compatible;
struct exynos_ufs_uic_attr *uic_attr;
unsigned int quirks;
unsigned int opts;
@@ -191,7 +190,7 @@ struct exynos_ufs {
struct ufs_pa_layer_attr dev_req_params;
struct ufs_phy_time_cfg t_cfg;
ktime_t entry_hibern8_t;
- struct exynos_ufs_drv_data *drv_data;
+ const struct exynos_ufs_drv_data *drv_data;
u32 opts;
#define EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL BIT(0)
--
2.33.0
next prev parent reply other threads:[~2021-10-18 12:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20211018124505epcas2p31437a0fae6711edeb9db5b49eb420e56@epcas2p3.samsung.com>
2021-10-18 12:42 ` [PATCH v5 00/15] introduce exynosauto v9 ufs driver Chanho Park
[not found] ` <CGME20211018124505epcas2p2d149a4f26d3475830a36c47049591bb2@epcas2p2.samsung.com>
2021-10-18 12:42 ` [PATCH v5 01/15] scsi: ufs: add quirk to handle broken UIC command Chanho Park
2021-10-28 3:18 ` Martin K. Petersen
2021-10-28 4:32 ` Chanho Park
[not found] ` <CGME20211018124505epcas2p143bb8374e3399e2670ced625862a8653@epcas2p1.samsung.com>
2021-10-18 12:42 ` [PATCH v5 02/15] scsi: ufs: add quirk to enable host controller without ph configuration Chanho Park
[not found] ` <CGME20211018124505epcas2p4f96cd4d9ea01a030d07fdf25c5a3d163@epcas2p4.samsung.com>
2021-10-18 12:42 ` [PATCH v5 03/15] scsi: ufs: ufs-exynos: change pclk available max value Chanho Park
[not found] ` <CGME20211018124505epcas2p22a463738c9ee028274be7ad06ed97a0d@epcas2p2.samsung.com>
2021-10-18 12:42 ` Chanho Park [this message]
[not found] ` <CGME20211018124505epcas2p32c65e409d95954c4995f8a1c22842509@epcas2p3.samsung.com>
2021-10-18 12:42 ` [PATCH v5 05/15] scsi: ufs: ufs-exynos: add refclkout_stop control Chanho Park
[not found] ` <CGME20211018124505epcas2p1d58eebe57563823e4768962342477a35@epcas2p1.samsung.com>
2021-10-18 12:42 ` [PATCH v5 06/15] scsi: ufs: ufs-exynos: add setup_clocks callback Chanho Park
[not found] ` <CGME20211018124505epcas2p2c68234b4e04cd3149eb21c987d474755@epcas2p2.samsung.com>
2021-10-18 12:42 ` [PATCH v5 07/15] scsi: ufs: ufs-exynos: support custom version of ufs_hba_variant_ops Chanho Park
[not found] ` <CGME20211018124505epcas2p4bf7f7fe8419a03d5510c9adf67aee5ab@epcas2p4.samsung.com>
2021-10-18 12:42 ` [PATCH v5 08/15] scsi: ufs: ufs-exynos: add EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR option Chanho Park
[not found] ` <CGME20211018124505epcas2p38f13fa432c4f6e5ca4898a8f41c2b041@epcas2p3.samsung.com>
2021-10-18 12:42 ` [PATCH v5 09/15] scsi: ufs: ufs-exynos: factor out priv data init Chanho Park
[not found] ` <CGME20211018124505epcas2p37bd15e319f80e82d321f85565afd7712@epcas2p3.samsung.com>
2021-10-18 12:42 ` [PATCH v5 10/15] scsi: ufs: ufs-exynos: add pre/post_hce_enable drv callbacks Chanho Park
[not found] ` <CGME20211018124506epcas2p27ae65b5e8ee4919cde0d989708c24ca6@epcas2p2.samsung.com>
2021-10-18 12:42 ` [PATCH v5 11/15] scsi: ufs: ufs-exynos: support exynosauto v9 ufs driver Chanho Park
[not found] ` <CGME20211018124506epcas2p25100e2163029de4ee8b8b87e7ff0f2a3@epcas2p2.samsung.com>
2021-10-18 12:42 ` [PATCH v5 12/15] dt-bindings: ufs: exynos-ufs: add io-coherency property Chanho Park
2021-10-18 17:54 ` Rob Herring
[not found] ` <CGME20211018124506epcas2p4cadea8f87fde299c22317496a2d29f14@epcas2p4.samsung.com>
2021-10-18 12:42 ` [PATCH v5 13/15] scsi: ufs: ufs-exynos: multi-host configuration for exynosauto Chanho Park
[not found] ` <CGME20211018124506epcas2p3a014f68fb3d6cdfa43a3562c74bb6895@epcas2p3.samsung.com>
2021-10-18 12:42 ` [PATCH v5 14/15] scsi: ufs: ufs-exynos: introduce exynosauto v9 virtual host Chanho Park
[not found] ` <CGME20211018124506epcas2p190b89643fbb14d99d7ab52f5ab97bf38@epcas2p1.samsung.com>
2021-10-18 12:42 ` [PATCH v5 15/15] dt-bindings: ufs: exynos-ufs: add exynosautov9 compatible Chanho Park
2021-10-28 13:26 ` [PATCH v5 00/15] introduce exynosauto v9 ufs driver Rob Herring
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=20211018124216.153072-5-chanho61.park@samsung.com \
--to=chanho61.park@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=goodjob.kwon@samsung.com \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=jh80.chung@samsung.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sowon.na@samsung.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;
as well as URLs for NNTP newsgroup(s).