summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-02-22 09:08:01 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-11 11:59:43 +0100
commit0aa3bdca3850b73623b377aa1da54c29979259a6 (patch)
tree2a3c680d7d56d897c629479775adfc23fc0cb90b
parentmedia: qcom: camss: Fix overflows in clock rate calculations (diff)
downloadlinux-0aa3bdca3850b73623b377aa1da54c29979259a6.tar.xz
linux-0aa3bdca3850b73623b377aa1da54c29979259a6.zip
media: solo6x10: Switch to using the new API kobj_to_dev()
fixed the following coccicheck: ./drivers/media/pci/solo6x10/solo6x10-core.c:371:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/pci/solo6x10/solo6x10-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
index d497afc7e7b7..4a546eeefe38 100644
--- a/drivers/media/pci/solo6x10/solo6x10-core.c
+++ b/drivers/media/pci/solo6x10/solo6x10-core.c
@@ -368,7 +368,7 @@ static ssize_t sdram_show(struct file *file, struct kobject *kobj,
struct bin_attribute *a, char *buf,
loff_t off, size_t count)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct solo_dev *solo_dev =
container_of(dev, struct solo_dev, dev);
const int size = solo_dev->sdram_size;