mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
can: make struct proto const
can_ioctl is the only reason for struct proto to be non-const. script/check-patch.pl suggests struct proto be const. Setting the reference to the common can_ioctl() in all CAN protocols directly removes the need to make the struct proto writable in af_can.c Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3b261ade42
commit
53914b6799
4 changed files with 12 additions and 14 deletions
|
@ -36,10 +36,10 @@
|
|||
* @prot: pointer to struct proto structure.
|
||||
*/
|
||||
struct can_proto {
|
||||
int type;
|
||||
int protocol;
|
||||
struct proto_ops *ops;
|
||||
struct proto *prot;
|
||||
int type;
|
||||
int protocol;
|
||||
const struct proto_ops *ops;
|
||||
struct proto *prot;
|
||||
};
|
||||
|
||||
/* function prototypes for the CAN networklayer core (af_can.c) */
|
||||
|
@ -58,5 +58,6 @@ extern void can_rx_unregister(struct net_device *dev, canid_t can_id,
|
|||
void *data);
|
||||
|
||||
extern int can_send(struct sk_buff *skb, int loop);
|
||||
extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
|
||||
|
||||
#endif /* CAN_CORE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue