Linux-mediatek Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] rtc: mt6397: Remove unused member dev
@ 2020-10-08  9:34 Fei Shao
  2020-10-15 10:01 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Fei Shao @ 2020-10-08  9:34 UTC (permalink / raw)
  To: Eddie Huang
  Cc: linux-rtc, Alessandro Zummo, Josef Friedl, Alexandre Belloni,
	Fei Shao, Ran Bi, Sean Wang, linux-kernel, linux-mediatek,
	linux-arm-kernel, Matthias Brugger, Lee Jones, Hsin-Hsiung Wang

Removing the struct member "dev" in mt6397 RTC driver because it's not
initialized and the only usage is for one debugging message.

Also fixed a typo in the error message.

Signed-off-by: Fei Shao <fshao@chromium.org>
---

 drivers/rtc/rtc-mt6397.c       | 3 ++-
 include/linux/mfd/mt6397/rtc.h | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c
index f8b1353777ba..1894aded4c85 100644
--- a/drivers/rtc/rtc-mt6397.c
+++ b/drivers/rtc/rtc-mt6397.c
@@ -31,7 +31,8 @@ static int mtk_rtc_write_trigger(struct mt6397_rtc *rtc)
 					MTK_RTC_POLL_DELAY_US,
 					MTK_RTC_POLL_TIMEOUT);
 	if (ret < 0)
-		dev_err(rtc->dev, "failed to write WRTGE: %d\n", ret);
+		dev_err(rtc->rtc_dev->dev.parent,
+			"failed to write WRTGR: %d\n", ret);
 
 	return ret;
 }
diff --git a/include/linux/mfd/mt6397/rtc.h b/include/linux/mfd/mt6397/rtc.h
index 66989a16221a..c3748b53bf7d 100644
--- a/include/linux/mfd/mt6397/rtc.h
+++ b/include/linux/mfd/mt6397/rtc.h
@@ -72,7 +72,6 @@ struct mtk_rtc_data {
 };
 
 struct mt6397_rtc {
-	struct device           *dev;
 	struct rtc_device       *rtc_dev;
 
 	/* Protect register access from multiple tasks */
-- 
2.28.0.806.g8561365e88-goog


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: mt6397: Remove unused member dev
  2020-10-08  9:34 [PATCH] rtc: mt6397: Remove unused member dev Fei Shao
@ 2020-10-15 10:01 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2020-10-15 10:01 UTC (permalink / raw)
  To: Eddie Huang, Fei Shao
  Cc: linux-rtc, Alessandro Zummo, Alexandre Belloni, Josef Friedl,
	Ran Bi, Sean Wang, linux-kernel, linux-mediatek,
	Hsin-Hsiung Wang, Matthias Brugger, Lee Jones, linux-arm-kernel

On Thu, 8 Oct 2020 17:34:14 +0800, Fei Shao wrote:
> Removing the struct member "dev" in mt6397 RTC driver because it's not
> initialized and the only usage is for one debugging message.
> 
> Also fixed a typo in the error message.

Applied, thanks!

[1/1] rtc: mt6397: Remove unused member dev
      commit: 770c03e6dabacd5b9f57bba93c4311d32b618640

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08  9:34 [PATCH] rtc: mt6397: Remove unused member dev Fei Shao
2020-10-15 10:01 ` Alexandre Belloni

Linux-mediatek Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mediatek/0 linux-mediatek/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mediatek linux-mediatek/ https://lore.kernel.org/linux-mediatek \
		linux-mediatek@lists.infradead.org
	public-inbox-index linux-mediatek

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mediatek


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git