tun: use DEVICE_ATTR_RO macro
authorYueHaibing <yuehaibing@huawei.com>
Wed, 19 May 2021 02:38:50 +0000 (10:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 May 2021 19:01:44 +0000 (12:01 -0700)
commitbc6d076daa8c66c79bdceda963fa66273103a276
tree7a52b2b5e55c0db11b91ada31650c981762e0b93
parent1756055de28412b6820b1221b1ab0092f6e780cb
tun: use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR,
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c