[media] media-device: fix infoleak in ioctl media_enum_entities()

This fixes CVE-2014-1739.

Change-Id: I00a873022c7ed46443fd4c4146c7416fd7e312b5
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
dlx: external_modem restart changes based on HTC stock code

In both 4.2.2 and 4.4.2 kernel source drops, there are changes
relating to subsystem_restart of the external_modem.  It looks
like they were working to address the problem reported in
CYAN-4205.

Our kernel code has diverged a lot from the stock code which makes
it imposible to directly import all the changes.  Not to mention
the usual excessive crap that would bring along with the meaningful
code.

I pulled in the necessary changes to change the subsystem_restart
code and the new code which also calls subsystem_restart.

This will hopefully fix kernel crashes like:

[ 113.723546] c0 131 [MDM][COMM] mdm_subsys_powerup: mdm modem restart timed out.
[ 113.723576] c0 131 Kernel panic - not syncing: subsystem_restart_wq_func[de592300]: Failed to powerup external_modem!

Change-Id: Id0c703a229b9854ce08ecf55e9b3a8ef6e9f7a07