|
@@ -424,13 +424,13 @@ static int ptp_dp83640_enable(struct ptp_clock_info *ptp,
|
|
|
struct dp83640_clock *clock =
|
|
struct dp83640_clock *clock =
|
|
|
container_of(ptp, struct dp83640_clock, caps);
|
|
container_of(ptp, struct dp83640_clock, caps);
|
|
|
struct phy_device *phydev = clock->chosen->phydev;
|
|
struct phy_device *phydev = clock->chosen->phydev;
|
|
|
- int index;
|
|
|
|
|
|
|
+ unsigned int index;
|
|
|
u16 evnt, event_num, gpio_num;
|
|
u16 evnt, event_num, gpio_num;
|
|
|
|
|
|
|
|
switch (rq->type) {
|
|
switch (rq->type) {
|
|
|
case PTP_CLK_REQ_EXTTS:
|
|
case PTP_CLK_REQ_EXTTS:
|
|
|
index = rq->extts.index;
|
|
index = rq->extts.index;
|
|
|
- if (index < 0 || index >= N_EXT_TS)
|
|
|
|
|
|
|
+ if (index >= N_EXT_TS)
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
event_num = EXT_EVENT + index;
|
|
event_num = EXT_EVENT + index;
|
|
|
evnt = EVNT_WR | (event_num & EVNT_SEL_MASK) << EVNT_SEL_SHIFT;
|
|
evnt = EVNT_WR | (event_num & EVNT_SEL_MASK) << EVNT_SEL_SHIFT;
|
|
@@ -1363,7 +1363,7 @@ static void __exit dp83640_exit(void)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
MODULE_DESCRIPTION("National Semiconductor DP83640 PHY driver");
|
|
MODULE_DESCRIPTION("National Semiconductor DP83640 PHY driver");
|
|
|
-MODULE_AUTHOR("Richard Cochran <richardcochran@gmail.at>");
|
|
|
|
|
|
|
+MODULE_AUTHOR("Richard Cochran <richardcochran@gmail.com>");
|
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_LICENSE("GPL");
|
|
|
|
|
|
|
|
module_init(dp83640_init);
|
|
module_init(dp83640_init);
|