] ptp: ocp: remove symlink for second GNSS
authorVadim Fedorenko <vfedorenko@novek.ru>
Mon, 10 Oct 2022 01:29:34 +0000 (04:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Oct 2022 07:37:24 +0000 (08:37 +0100)
Destroy code doesn't remove symlink for ttyGNSS2 device introduced
earlier. Add cleanup code.

Fixes: 71d7e0850476 ("ptp: ocp: Add second GNSS device")
Signed-off-by: Vadim Fedorenko <vadfed@fb.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_ocp.c

index d36c3f5..a48d9b7 100644 (file)
@@ -3657,6 +3657,7 @@ ptp_ocp_detach_sysfs(struct ptp_ocp *bp)
        struct device *dev = &bp->dev;
 
        sysfs_remove_link(&dev->kobj, "ttyGNSS");
+       sysfs_remove_link(&dev->kobj, "ttyGNSS2");
        sysfs_remove_link(&dev->kobj, "ttyMAC");
        sysfs_remove_link(&dev->kobj, "ptp");
        sysfs_remove_link(&dev->kobj, "pps");