OSDN Git Service

media: atomisp: improve device detection code
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 8 May 2020 09:27:02 +0000 (11:27 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 12:50:58 +0000 (14:50 +0200)
commitca133c395f2f6ccf7980677d6583224d23711897
tree200368b94b91cac3c5b1463bd665d10d15cbc03c
parent9b7632e8fe7f7e0d75a61dccf2917e55022ecb66
media: atomisp: improve device detection code

- Remove useless check if !dev at the probe function: if
  such function is called, the device is defined.
- Cleanup the PCI ID table using macros.
- Use the same macros at the version-dependent part of the
  atomisp_v4l2.c file;
- Add print messages to help understand what model the
  driver detect;
- If device is not valid, better explain why.

Signed-off-by: Mauro Carvalho Chehehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_v4l2.c