.. | .. |
---|
79 | 79 | #define APR_SVC_MAJOR_VERSION(v) ((v >> 16) & 0xFF) |
---|
80 | 80 | #define APR_SVC_MINOR_VERSION(v) (v & 0xFF) |
---|
81 | 81 | |
---|
| 82 | +struct packet_router; |
---|
| 83 | +struct pkt_router_svc { |
---|
| 84 | + struct device *dev; |
---|
| 85 | + struct packet_router *pr; |
---|
| 86 | + spinlock_t lock; |
---|
| 87 | + int id; |
---|
| 88 | + void *priv; |
---|
| 89 | +}; |
---|
| 90 | + |
---|
82 | 91 | struct apr_device { |
---|
83 | 92 | struct device dev; |
---|
84 | 93 | uint16_t svc_id; |
---|
.. | .. |
---|
86 | 95 | uint32_t version; |
---|
87 | 96 | char name[APR_NAME_SIZE]; |
---|
88 | 97 | const char *service_path; |
---|
89 | | - spinlock_t lock; |
---|
| 98 | + struct pkt_router_svc svc; |
---|
90 | 99 | struct list_head node; |
---|
91 | 100 | }; |
---|
92 | 101 | |
---|
93 | 102 | #define to_apr_device(d) container_of(d, struct apr_device, dev) |
---|
| 103 | +#define svc_to_apr_device(d) container_of(d, struct apr_device, svc) |
---|
94 | 104 | |
---|
95 | 105 | struct apr_driver { |
---|
96 | 106 | int (*probe)(struct apr_device *sl); |
---|