Skip to content

Commit 4e25792

Browse files
committed
Merge branch 'ptp-ocp-minor-updates-and-fixes'
Jonathan Lemon says: ==================== ptp: ocp: minor updates and fixes. Fix errors spotted by automated tools. Add myself to the MAINTAINERS for the ptp_ocp driver. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents fd04ed1 + b40fb16 commit 4e25792

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13885,6 +13885,12 @@ F: Documentation/devicetree/
1388513885
F: arch/*/boot/dts/
1388613886
F: include/dt-bindings/
1388713887

13888+
OPENCOMPUTE PTP CLOCK DRIVER
13889+
M: Jonathan Lemon <[email protected]>
13890+
13891+
S: Maintained
13892+
F: drivers/ptp/ptp_ocp.c
13893+
1388813894
OPENCORES I2C BUS DRIVER
1388913895
M: Peter Korsgaard <[email protected]>
1389013896
M: Andrew Lunn <[email protected]>

drivers/ptp/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ config PTP_1588_CLOCK_OCP
177177
imply MTD_SPI_NOR
178178
imply I2C_XILINX
179179
select SERIAL_8250
180+
select NET_DEVLINK
180181

181182
default n
182183
help

drivers/ptp/ptp_ocp.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ ptp_ocp_devlink_flash(struct devlink *devlink, struct device *dev,
763763
size_t off, len, resid, wrote;
764764
struct erase_info erase;
765765
size_t base, blksz;
766-
int err;
766+
int err = 0;
767767

768768
off = 0;
769769
base = bp->flash_start;
@@ -1438,7 +1438,7 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
14381438
bp = devlink_priv(devlink);
14391439
err = ptp_ocp_device_init(bp, pdev);
14401440
if (err)
1441-
goto out_unregister;
1441+
goto out_disable;
14421442

14431443
/* compat mode.
14441444
* Older FPGA firmware only returns 2 irq's.
@@ -1476,8 +1476,9 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
14761476

14771477
out:
14781478
ptp_ocp_detach(bp);
1479-
pci_disable_device(pdev);
14801479
pci_set_drvdata(pdev, NULL);
1480+
out_disable:
1481+
pci_disable_device(pdev);
14811482
out_unregister:
14821483
devlink_unregister(devlink);
14831484
out_free:
@@ -1493,8 +1494,8 @@ ptp_ocp_remove(struct pci_dev *pdev)
14931494
struct devlink *devlink = priv_to_devlink(bp);
14941495

14951496
ptp_ocp_detach(bp);
1496-
pci_disable_device(pdev);
14971497
pci_set_drvdata(pdev, NULL);
1498+
pci_disable_device(pdev);
14981499

14991500
devlink_unregister(devlink);
15001501
devlink_free(devlink);

0 commit comments

Comments
 (0)