> +static bool ines_match(struct sk_buff *skb, unsigned int ptp_class,
> + struct ines_timestamp *ts);
> +static int ines_rxfifo_read(struct ines_port *port);
> +static u64 ines_rxts64(struct ines_port *port, unsigned int words);
> +static bool ines_timestamp_expired(struct ines_timestamp *ts);
> +static u64 ines_txts64(struct ines_port *port, unsigned int words);
> +static void ines_txtstamp_work(struct work_struct *work);
> +static bool is_sync_pdelay_resp(struct sk_buff *skb, int type);
> +static u8 tag_to_msgtype(u8 tag);
Hi Richard
I don't know about the PTP subsystem, but in general, forward
declarations are frowned upon, and it is generally requested to
reorder the functions to remove them.
> +static struct platform_driver ines_ptp_ctrl_driver = {
> + .probe = ines_ptp_ctrl_probe,
> + .remove = ines_ptp_ctrl_remove,
> + .driver = {
> + .name = "ines_ptp_ctrl",
> + .of_match_table = of_match_ptr(ines_ptp_ctrl_of_match),
> + },
> +};
> +
> +static int __init ines_ptp_init(void)
> +{
> + return platform_driver_register(&ines_ptp_ctrl_driver);
> +}
> +
> +static void __exit ines_ptp_cleanup(void)
> +{
> + platform_driver_unregister(&ines_ptp_ctrl_driver);
> +}
include/linux/platform_device.h:
/* module_platform_driver() - Helper macro for drivers that don't do
* anything special in module init/exit. This eliminates a lot of
* boilerplate. Each module may only use this macro once, and
* calling it replaces module_init() and module_exit()
*/
#define module_platform_driver(__platform_driver) \
module_driver(__platform_driver, platform_driver_register, \
platform_driver_unregister)
Andrew