diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-02-14 10:23:34 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-17 11:03:06 -0500 |
commit | 85a66e55019583da1e0f18706b7a8281c9f6de5b (patch) | |
tree | a2e0e1be3db1c252076604b9aeb82617c219d349 /drivers/ptp/ptp_private.h | |
parent | af59e717d5ff9c8dbf9bcc581c0dfb3b2a9c9030 (diff) | |
download | linux-85a66e55019583da1e0f18706b7a8281c9f6de5b.tar.bz2 |
ptp: create "pins" together with the rest of attributes
Let's switch to using device_create_with_groups(), which will allow us to
create "pins" attribute group together with the rest of ptp device
attributes, and before userspace gets notified about ptp device creation.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_private.h')
-rw-r--r-- | drivers/ptp/ptp_private.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ptp/ptp_private.h b/drivers/ptp/ptp_private.h index 9c5d41421b65..d95888974d0c 100644 --- a/drivers/ptp/ptp_private.h +++ b/drivers/ptp/ptp_private.h @@ -54,6 +54,8 @@ struct ptp_clock { struct device_attribute *pin_dev_attr; struct attribute **pin_attr; struct attribute_group pin_attr_group; + /* 1st entry is a pointer to the real group, 2nd is NULL terminator */ + const struct attribute_group *pin_attr_groups[2]; }; /* @@ -94,8 +96,7 @@ uint ptp_poll(struct posix_clock *pc, extern const struct attribute_group *ptp_groups[]; -int ptp_cleanup_sysfs(struct ptp_clock *ptp); - -int ptp_populate_sysfs(struct ptp_clock *ptp); +int ptp_populate_pin_groups(struct ptp_clock *ptp); +void ptp_cleanup_pin_groups(struct ptp_clock *ptp); #endif |