rtc: mt6397: Remove unused member dev
authorFei Shao <fshao@chromium.org>
Thu, 8 Oct 2020 09:34:14 +0000 (17:34 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 15 Oct 2020 10:01:29 +0000 (12:01 +0200)
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201008093414.1911699-1-fshao@chromium.org
drivers/rtc/rtc-mt6397.c
include/linux/mfd/mt6397/rtc.h

index f8b1353777ba699f8d839f30b45f0304c11c6190..1894aded4c85775f2c939fc46398678e1d00db71 100644 (file)
@@ -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;
 }
index 66989a16221acfdcb8ea3e50f8d8677791cefa0a..c3748b53bf7dd2f5ac2cb7af68fd4b2583989247 100644 (file)
@@ -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 */