Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: drop unnecessary networking includes

dvb_net.h includes a bunch of core networking headers which increases
the number of objects rebuilt when we touch them. They are unnecessary
for the header itself and only one driver has an indirect dependency.

tveeprom.h includes if_packet to gain access to ETH_ALEN. This
is a bit of an overkill because if_packet.h pulls in skbuff.h.
The definition of ETH_ALEN is in the uAPI header, which is
very rarely touched, so switch to including that.

This results in roughly 250 fewer objects built when skbuff.h
is touched (6028 -> 5788).

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Jakub Kicinski and committed by
Mauro Carvalho Chehab
de163422 e78da4da

+6 -5
+1
drivers/media/pci/ttpci/budget-av.c
··· 31 31 #include "dvb-pll.h" 32 32 #include <media/drv-intf/saa7146_vv.h> 33 33 #include <linux/module.h> 34 + #include <linux/etherdevice.h> 34 35 #include <linux/errno.h> 35 36 #include <linux/slab.h> 36 37 #include <linux/interrupt.h>
+2
drivers/media/usb/dvb-usb/pctv452e.c
··· 26 26 #include <media/dvb_ca_en50221.h> 27 27 #include "ttpci-eeprom.h" 28 28 29 + #include <linux/etherdevice.h> 30 + 29 31 static int debug; 30 32 module_param(debug, int, 0644); 31 33 MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
+2 -4
include/media/dvb_net.h
··· 19 19 #define _DVB_NET_H_ 20 20 21 21 #include <linux/module.h> 22 - #include <linux/netdevice.h> 23 - #include <linux/inetdevice.h> 24 - #include <linux/etherdevice.h> 25 - #include <linux/skbuff.h> 26 22 27 23 #include <media/dvbdev.h> 24 + 25 + struct net_device; 28 26 29 27 #define DVB_NET_DEVICES_MAX 10 30 28
+1 -1
include/media/tveeprom.h
··· 5 5 * eeproms. 6 6 */ 7 7 8 - #include <linux/if_ether.h> 8 + #include <uapi/linux/if_ether.h> 9 9 10 10 /** 11 11 * enum tveeprom_audio_processor - Specifies the type of audio processor