aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ptp/ptp_chardev.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 419056d7887e..f8a76090cbca 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -86,17 +86,12 @@ int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
86 return -EINVAL; 86 return -EINVAL;
87 break; 87 break;
88 case PTP_PF_PHYSYNC: 88 case PTP_PF_PHYSYNC:
89 pr_err("sorry, cannot reassign the calibration pin\n"); 89 if (chan != 0)
90 return -EINVAL; 90 return -EINVAL;
91 default: 91 default:
92 return -EINVAL; 92 return -EINVAL;
93 } 93 }
94 94
95 if (pin2->func == PTP_PF_PHYSYNC) {
96 pr_err("sorry, cannot reprogram the calibration pin\n");
97 return -EINVAL;
98 }
99
100 if (info->verify(info, pin, func, chan)) { 95 if (info->verify(info, pin, func, chan)) {
101 pr_err("driver cannot use function %u on pin %u\n", func, chan); 96 pr_err("driver cannot use function %u on pin %u\n", func, chan);
102 return -EOPNOTSUPP; 97 return -EOPNOTSUPP;