summaryrefslogtreecommitdiff
path: root/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
AgeCommit message (Collapse)Author
2017-12-29media: staging: atomisp: Remove non-ACPI leftoversAndy Shevchenko
Since all drivers are solely requiring ACPI enumeration, there is no need to additionally check for legacy platform data or ACPI handle. Remove leftovers from the sensors and platform code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Remove FSF snail addressAndy Shevchenko
Snail address is subject to change, remove it completely from the code. This has been done using the following script: sed -i '/You should/,/02110-1301/d' \ $(git grep -n -w Franklin -- drivers/staging/media/atomisp/ | cut -f1 -d:) No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Remove unused members of camera_sensor_platform_dataAndy Shevchenko
Remove unused members along with dead code. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Remove ->power_ctrl() callbackAndy Shevchenko
There is redundant callback which does nothing in upstreamed version of the driver. Remove it along with user call places. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Remove ->gpio_ctrl() callbackAndy Shevchenko
There is redundant callback which does nothing in upstreamed version of the driver. Remove it along with user call places. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Remove unneeded gpio.h inclusionAndy Shevchenko
GPIO handling is done only in two modules, the rest do not need to include linux/gpio.h header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Switch i2c drivers to use ->probe_new()Andy Shevchenko
Since most of the drivers are being used on ACPI enabled platforms there is no need to keep legacy API support for them. Thus, switch to ->probe_new() callback and remove orphaned code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: Use module_i2c_driver() macroAndy Shevchenko
This is done using coccinelle semantic patch: //<smpl> @a@ identifier f, x; @@ -static f(...) { return i2c_add_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { i2c_del_driver(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_i2c_driver; @@ -module_exit(e); +module_i2c_driver(x); //</smpl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31media: staging: atomisp: cleanup out of memory messagesAishwarya Pant
Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ex; | return; | return err; | goto l; ) - } else s Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-27media: staging: atomisp: Add driver prefix to Kconfig option and module namesSakari Ailus
By adding the "atomisp-" prefix to module names (and "ATOMISP_" to Kconfig options), the staging drivers for e.g. sensors are labelled as being specific to atomisp, which they effectively are. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>