]> asedeno.scripts.mit.edu Git - linux.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Sep 2016 07:53:49 +0000 (03:53 -0400)
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index cbc0b8ad916ceabd4be16c580fa5e0697d941b65..a9f9f3738022a708b0020659d30d2aafacc12cf6 100644 (file)
@@ -4323,6 +4323,7 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
 
 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;
@@ -4340,6 +4341,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)