Skip to content

Commit e14e05e

Browse files
lunndavem330
authored andcommitted
net: devlink: regions: Add a priv member to the regions ops struct
The driver may have multiple regions which can be dumped using one function. However, for this to work, additional information is needed. Add a priv member to the ops structure for the driver to use however it likes. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0db0561 commit e14e05e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/net/devlink.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,14 @@ struct devlink_info_req;
561561
* the data variable must be updated to point to the snapshot data.
562562
* The function will be called while the devlink instance lock is
563563
* held.
564+
* @priv: Pointer to driver private data for the region operation
564565
*/
565566
struct devlink_region_ops {
566567
const char *name;
567568
void (*destructor)(const void *data);
568569
int (*snapshot)(struct devlink *devlink, struct netlink_ext_ack *extack,
569570
u8 **data);
571+
void *priv;
570572
};
571573

572574
struct devlink_fmsg;

0 commit comments

Comments
 (0)