diff options
| author | James Morris <james.l.morris@oracle.com> | 2013-03-11 12:54:48 +1100 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2013-03-11 12:54:48 +1100 |
| commit | 2c4cdf5950b1a7a9d731c03c56e2cea3bd8ca7b7 (patch) | |
| tree | ed0cdc81e72343132da9f52620ec40391f6dcbed /include/linux/pps_kernel.h | |
| parent | 5b2660326039a32b28766cb4c1a8b1bdcfadc375 (diff) | |
| parent | f6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff) | |
Merge tag 'v3.9-rc2' into next
Sync with Linus.
Linux 3.9-rc2
Diffstat (limited to 'include/linux/pps_kernel.h')
| -rw-r--r-- | include/linux/pps_kernel.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 0cc45ae1afd5..7db3eb93a079 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h @@ -43,7 +43,7 @@ struct pps_source_info { int event, void *data); /* PPS echo function */ struct module *owner; - struct device *dev; + struct device *dev; /* Parent device for device_create */ }; struct pps_event_time { @@ -69,6 +69,7 @@ struct pps_device { wait_queue_head_t queue; /* PPS event queue */ unsigned int id; /* PPS source unique ID */ + void const *lookup_cookie; /* pps_lookup_dev only */ struct cdev cdev; struct device *dev; struct fasync_struct *async_queue; /* fasync method */ @@ -82,16 +83,26 @@ struct pps_device { extern struct device_attribute pps_attrs[]; /* + * Internal functions. + * + * These are not actually part of the exported API, but this is a + * convenient header file to put them in. + */ + +extern int pps_register_cdev(struct pps_device *pps); +extern void pps_unregister_cdev(struct pps_device *pps); + +/* * Exported functions */ extern struct pps_device *pps_register_source( struct pps_source_info *info, int default_params); extern void pps_unregister_source(struct pps_device *pps); -extern int pps_register_cdev(struct pps_device *pps); -extern void pps_unregister_cdev(struct pps_device *pps); extern void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event, void *data); +/* Look up a pps device by magic cookie */ +struct pps_device *pps_lookup_dev(void const *cookie); static inline void timespec_to_pps_ktime(struct pps_ktime *kt, struct timespec ts) |
