ptp: link the phc device to its parent device

PTP Hardware Clock devices appear as class devices in sysfs. This patch
changes the registration API to use the parent device, clarifying the
clock's relationship to the underlying device.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Richard Cochran 2012-09-22 07:02:03 +00:00 committed by David S. Miller
parent 5c35bad5ff
commit 1ef761582c
9 changed files with 18 additions and 11 deletions

View file

@ -21,6 +21,7 @@
#ifndef _PTP_CLOCK_KERNEL_H_
#define _PTP_CLOCK_KERNEL_H_
#include <linux/device.h>
#include <linux/pps_kernel.h>
#include <linux/ptp_clock.h>
@ -93,10 +94,12 @@ struct ptp_clock;
/**
* ptp_clock_register() - register a PTP hardware clock driver
*
* @info: Structure describing the new clock.
* @info: Structure describing the new clock.
* @parent: Pointer to the parent device of the new clock.
*/
extern struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info);
extern struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
struct device *parent);
/**
* ptp_clock_unregister() - unregister a PTP hardware clock driver