History log of /linux-master/drivers/media/dvb-frontends/au8522_priv.h
Revision Date Author Comments
# 74ba9207 20-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
675 mass ave cambridge ma 02139 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 441 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 44fd653b 01-Aug-2018 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

media: au8522: declare its own pads

As we don't need anymore to share pad numbers with similar
drivers, use its own pad definition instead of a global
model.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# 6e6a8b5a 04-Jan-2018 Mauro Carvalho Chehab <mchehab@kernel.org>

media: replace all <spaces><tab> occurrences

There are a lot of places where sequences of space/tabs are
found. Get rid of all spaces before tabs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# fada1935 28-Dec-2017 Mauro Carvalho Chehab <mchehab@kernel.org>

media: move dvb kAPI headers to include/media

Except for DVB, all media kAPI headers are at include/media.

Move the headers to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# bddc4187 02-Mar-2016 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] au0828: use standard demod pads struct

As we want au0828 to use the core function to create the MC
graphs, use enum demod_pad_index instead of
enum au8522_media_pads.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 4c4ada73 11-Feb-2016 Shuah Khan <shuah@kernel.org>

[media] media: Move au8522_media_pads enum to au8522.h from au8522_priv.h

Move the au8522_media_pads enum to au8522.h from au8522_priv.h to export
them. This will allow au0828-core to use these defines instead of
hard-coding them them.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# bed69196 08-Jun-2015 Rafael Lourenço de Lima Chehab <chehabrafael@gmail.com>

[media] au0828: Add support for media controller

Add support for analog and dvb tv using media controller.

Signed-off-by: Rafael Lourenço de Lima Chehab <chehabrafael@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# aa37763f 21-Dec-2015 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] au8522: Avoid memory leak for device config data

As reported by kmemleak:

unreferenced object 0xffff880321e1da40 (size 32):
comm "modprobe", pid 3309, jiffies 4295019569 (age 2359.636s)
hex dump (first 32 bytes):
47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 G...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff82278c8e>] kmemleak_alloc+0x4e/0xb0
[<ffffffff8153c08c>] kmem_cache_alloc_trace+0x1ec/0x280
[<ffffffffa13a896a>] au8522_probe+0x19a/0xa30 [au8522_decoder]
[<ffffffff81de0032>] i2c_device_probe+0x2b2/0x490
[<ffffffff81ca7004>] driver_probe_device+0x454/0xd90
[<ffffffff81ca7c1b>] __device_attach_driver+0x17b/0x230
[<ffffffff81ca15da>] bus_for_each_drv+0x11a/0x1b0
[<ffffffff81ca6a4d>] __device_attach+0x1cd/0x2c0
[<ffffffff81ca7d43>] device_initial_probe+0x13/0x20
[<ffffffff81ca451f>] bus_probe_device+0x1af/0x250
[<ffffffff81c9e0f3>] device_add+0x943/0x13b0
[<ffffffff81c9eb7a>] device_register+0x1a/0x20
[<ffffffff81de8626>] i2c_new_device+0x5d6/0x8f0
[<ffffffffa0d88ea4>] v4l2_i2c_new_subdev_board+0x1e4/0x250 [v4l2_common]
[<ffffffffa0d88fe7>] v4l2_i2c_new_subdev+0xd7/0x110 [v4l2_common]
[<ffffffffa13b2f76>] au0828_card_analog_fe_setup+0x2e6/0x3f0 [au0828]

Checking where the error happens:
(gdb) list *au8522_probe+0x19a
0x99a is in au8522_probe (drivers/media/dvb-frontends/au8522_decoder.c:761).
756 printk(KERN_INFO "au8522_decoder attach existing instance.\n");
757 break;
758 }
759
760 demod_config = kzalloc(sizeof(struct au8522_config), GFP_KERNEL);
761 if (demod_config == NULL) {
762 if (instance == 1)
763 kfree(state);
764 return -ENOMEM;
765 }

Shows that the error path is not being handled properly.

The are actually several issues here:

1) config free should have been calling hybrid_tuner_release_state()
function, by calling au8522_release_state();

2) config is only allocated at the digital part. On the analog one,
it is received from the caller.

A complex logic could be added to address it, however, it is simpler
to just embeed config inside the state.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 0df289a2 07-Jun-2015 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] dvb: Get rid of typedev usage for enums

The DVB API was originally defined using typedefs. This is against
Kernel CodingStyle, and there's no good usage here. While we can't
remove its usage on userspace, we can avoid its usage in Kernelspace.

So, let's do it.

This patch was generated by this shell script:

for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done

While here, make CodingStyle fixes on the affected lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*


# f2fd7ce6 08-Jun-2014 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] au0828/au8522: Add PAL-M support

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 38fe3510 08-Jun-2014 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] au8522: be sure that the setup will happen at streamon time

The same demod is used on both analog and digital mode. We should
not let the commands for analog mode to happen while the device
is in digital mode. So, monitor it via streamon.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 5a4bdb4b 15-Feb-2013 Hans Verkuil <hans.verkuil@cisco.com>

[media] au8522_decoder: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 9a0bf528 13-Aug-2012 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] move the dvb/frontends to drivers/media/dvb-frontends

Raise the DVB frontends one level up, as the intention is to remove
the drivers/media/dvb directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>