Skip to content

Commit

Permalink
Merge pull request torvalds#178 in PROCESSOR-SDK/processor-sdk-linux …
Browse files Browse the repository at this point in the history
…from plsdk-2753 to processor-sdk-linux-4.19.y

* commit 'e4d2539dc6149139c02223b99ff5412fd07707a4':
  net: ethernet: ti: ptp_bc: allow PTP sync enable when PTP BC is disabled
  • Loading branch information
Muralidharan Karicheri committed Aug 15, 2019
2 parents de53fb5 + e4d2539 commit 903e38b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/net/ethernet/ti/ptp_bc.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ bool ptp_bc_clock_sync_enable(int clkid, int enable)
unsigned long flags;
bool allow = false;

if (!ptp_bc_initialized)
return true;

if (clkid < 0 || clkid >= MAX_CLKS)
return false;

Expand Down Expand Up @@ -170,7 +173,7 @@ int ptp_bc_clock_register(int clocktype)
int id = -1;

if (!ptp_bc_initialized) {
pr_err("ptp_bc error: NOT initialized.\n");
pr_debug("ptp_bc error: NOT initialized.\n");
return -1;
}

Expand Down Expand Up @@ -204,6 +207,9 @@ EXPORT_SYMBOL_GPL(ptp_bc_clock_unregister);
void ptp_bc_mux_ctrl_register(void *ctx, spinlock_t *lock,
ptp_bc_mux_ctrl_handle_t handler)
{
if (!ptp_bc_initialized)
return;

if (ctx && lock && handler) {
bc_mux_ctrl_handler = handler;
bc_mux_ctrl_ctx = ctx;
Expand Down

0 comments on commit 903e38b

Please sign in to comment.