]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt_en: Fix build error for kernesl without RTC-LIB
authorRob Swindell <swindell@broadcom.com>
Tue, 20 Sep 2016 07:36:33 +0000 (03:36 -0400)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 18:07:48 +0000 (13:07 -0500)
Orabug: 24567991

bnxt_hwrm_fw_set_time() now returns -EOPNOTSUPP when built for kernel
without RTC_LIB.  Setting the firmware time is not critical to the
successful completion of the firmware update process.

Signed-off-by: Rob Swindell <Rob.Swindell@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 878786d95e07ce2f5fb6e3cd8a6c2ed320339196)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 3413d449875615eadd32654b8a79381a32dca9c7..e7f8b99c53b6afed6a434fdac4599a8683c58f6a 100644 (file)
@@ -4341,6 +4341,7 @@ hwrm_ver_get_exit:
 
 int bnxt_hwrm_fw_set_time(struct bnxt *bp)
 {
+#if IS_ENABLED(CONFIG_RTC_LIB)
        struct hwrm_fw_set_time_input req = {0};
        struct rtc_time tm;
        struct timeval tv;
@@ -4358,6 +4359,9 @@ int bnxt_hwrm_fw_set_time(struct bnxt *bp)
        req.minute = tm.tm_min;
        req.second = tm.tm_sec;
        return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+#else
+       return -EOPNOTSUPP;
+#endif
 }
 
 static int bnxt_hwrm_port_qstats(struct bnxt *bp)