Commit 4e25792f authored by Jakub Kicinski's avatar Jakub Kicinski

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/20210816221337.390645-1-jonathan.lemon@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents fd04ed1c b40fb16d
...@@ -13885,6 +13885,12 @@ F: Documentation/devicetree/ ...@@ -13885,6 +13885,12 @@ F: Documentation/devicetree/
F: arch/*/boot/dts/ F: arch/*/boot/dts/
F: include/dt-bindings/ F: include/dt-bindings/
OPENCOMPUTE PTP CLOCK DRIVER
M: Jonathan Lemon <jonathan.lemon@gmail.com>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/ptp/ptp_ocp.c
OPENCORES I2C BUS DRIVER OPENCORES I2C BUS DRIVER
M: Peter Korsgaard <peter@korsgaard.com> M: Peter Korsgaard <peter@korsgaard.com>
M: Andrew Lunn <andrew@lunn.ch> M: Andrew Lunn <andrew@lunn.ch>
......
...@@ -177,6 +177,7 @@ config PTP_1588_CLOCK_OCP ...@@ -177,6 +177,7 @@ config PTP_1588_CLOCK_OCP
imply MTD_SPI_NOR imply MTD_SPI_NOR
imply I2C_XILINX imply I2C_XILINX
select SERIAL_8250 select SERIAL_8250
select NET_DEVLINK
default n default n
help help
......
...@@ -763,7 +763,7 @@ ptp_ocp_devlink_flash(struct devlink *devlink, struct device *dev, ...@@ -763,7 +763,7 @@ ptp_ocp_devlink_flash(struct devlink *devlink, struct device *dev,
size_t off, len, resid, wrote; size_t off, len, resid, wrote;
struct erase_info erase; struct erase_info erase;
size_t base, blksz; size_t base, blksz;
int err; int err = 0;
off = 0; off = 0;
base = bp->flash_start; base = bp->flash_start;
...@@ -1438,7 +1438,7 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1438,7 +1438,7 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
bp = devlink_priv(devlink); bp = devlink_priv(devlink);
err = ptp_ocp_device_init(bp, pdev); err = ptp_ocp_device_init(bp, pdev);
if (err) if (err)
goto out_unregister; goto out_disable;
/* compat mode. /* compat mode.
* Older FPGA firmware only returns 2 irq's. * 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) ...@@ -1476,8 +1476,9 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
out: out:
ptp_ocp_detach(bp); ptp_ocp_detach(bp);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
out_disable:
pci_disable_device(pdev);
out_unregister: out_unregister:
devlink_unregister(devlink); devlink_unregister(devlink);
out_free: out_free:
...@@ -1493,8 +1494,8 @@ ptp_ocp_remove(struct pci_dev *pdev) ...@@ -1493,8 +1494,8 @@ ptp_ocp_remove(struct pci_dev *pdev)
struct devlink *devlink = priv_to_devlink(bp); struct devlink *devlink = priv_to_devlink(bp);
ptp_ocp_detach(bp); ptp_ocp_detach(bp);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
pci_disable_device(pdev);
devlink_unregister(devlink); devlink_unregister(devlink);
devlink_free(devlink); devlink_free(devlink);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment