mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04: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 <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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…
Reference in a new issue