Skip to contentSkip to conversation

staging: atomisp: clean up bomb

PATCH In review Andy Shevchenko 3 participants 18 messages Sep 27, 2017 – Oct 27, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover staging: atomisp: clean up bomb

The driver has been submitted with a limitation to few platforms and sensors which it does support. Even though two sensor drivers have no users neither on ACPI-enabled platforms, nor in current Linux kernel code. Patches 1 and 2 removes those drivers for now.

It seems new contributors follow cargo cult programming done by the original driver developers. It's neither good for code, nor for reviewing process. To avoid such issues in the future here are few clean up patches, i.e. patches 3, 4, 6. 13.

On top of this here are clean ups with regard to GPIO use. One may consider this as an intermediate clean up. This part toughly related to removal of unused sensor drivers in patches 1 and 2.

Patch series has been partially compile tested. It would be nice to see someone with hardware to confirm it doesn't break anything.

Andy Shevchenko (13):
staging: atomisp: Remove IMX sensor support
staging: atomisp: Remove AP1302 sensor support
staging: atomisp: Use module_i2c_driver() macro
staging: atomisp: Switch i2c drivers to use ->probe_new()
staging: atomisp: Do not set GPIO twice
staging: atomisp: Remove unneeded gpio.h inclusion
staging: atomisp: Remove ->gpio_ctrl() callback
staging: atomisp: Remove ->power_ctrl() callback
staging: atomisp: Remove unused members of camera_sensor_platform_data
staging: atomisp: Remove Gmin dead code #1
staging: atomisp: Remove Gmin dead code #2
staging: atomisp: Remove duplicate declaration in header
staging: atomisp: Remove FSF snail address

 drivers/staging/media/atomisp/i2c/Kconfig          |   22 +-
 drivers/staging/media/atomisp/i2c/Makefile         |    3 -
 drivers/staging/media/atomisp/i2c/ap1302.c         | 1255 --------
 drivers/staging/media/atomisp/i2c/ap1302.h         |  198 --
 drivers/staging/media/atomisp/i2c/gc0310.c         |   49 +-
 drivers/staging/media/atomisp/i2c/gc0310.h         |   11 -
 drivers/staging/media/atomisp/i2c/gc2235.c         |   50 +-
 drivers/staging/media/atomisp/i2c/gc2235.h         |    7 -
 drivers/staging/media/atomisp/i2c/imx/Kconfig      |    9 -
 drivers/staging/media/atomisp/i2c/imx/Makefile     |   13 -
 drivers/staging/media/atomisp/i2c/imx/ad5816g.c    |  216 --
 drivers/staging/media/atomisp/i2c/imx/ad5816g.h    |   49 -
 drivers/staging/media/atomisp/i2c/imx/common.h     |   65 -
 drivers/staging/media/atomisp/i2c/imx/drv201.c     |  208 --
 drivers/staging/media/atomisp/i2c/imx/drv201.h     |   38 -
 drivers/staging/media/atomisp/i2c/imx/dw9714.c     |  222 --
 drivers/staging/media/atomisp/i2c/imx/dw9714.h     |   63 -
 drivers/staging/media/atomisp/i2c/imx/dw9718.c     |  233 --
 drivers/staging/media/atomisp/i2c/imx/dw9718.h     |   64 -
 drivers/staging/media/atomisp/i2c/imx/dw9719.c     |  198 --
 drivers/staging/media/atomisp/i2c/imx/dw9719.h     |   58 -
 drivers/staging/media/atomisp/i2c/imx/imx.c        | 2479 --------------
 drivers/staging/media/atomisp/i2c/imx/imx.h        |  737 -----
 drivers/staging/media/atomisp/i2c/imx/imx132.h     |  566 ----
 drivers/staging/media/atomisp/i2c/imx/imx134.h     | 2464 --------------
 drivers/staging/media/atomisp/i2c/imx/imx135.h     | 3374 --------------------
 drivers/staging/media/atomisp/i2c/imx/imx175.h     | 1959 ------------
 drivers/staging/media/atomisp/i2c/imx/imx208.h     |  550 ----
 drivers/staging/media/atomisp/i2c/imx/imx219.h     |  227 --
 drivers/staging/media/atomisp/i2c/imx/imx227.h     |  726 -----
 drivers/staging/media/atomisp/i2c/imx/otp.c        |   39 -
 .../media/atomisp/i2c/imx/otp_brcc064_e2prom.c     |   80 -
 drivers/staging/media/atomisp/i2c/imx/otp_e2prom.c |   89 -
 drivers/staging/media/atomisp/i2c/imx/otp_imx.c    |  190 --
 drivers/staging/media/atomisp/i2c/imx/vcm.c        |   45 -
 .../staging/media/atomisp/i2c/libmsrlisthelper.c   |    4 -
 drivers/staging/media/atomisp/i2c/lm3554.c         |   35 +-
 drivers/staging/media/atomisp/i2c/mt9m114.c        |   47 +-
 drivers/staging/media/atomisp/i2c/mt9m114.h        |    9 -
 drivers/staging/media/atomisp/i2c/ov2680.c         |   39 +-
 drivers/staging/media/atomisp/i2c/ov2680.h         |   14 -
 drivers/staging/media/atomisp/i2c/ov2722.c         |   50 +-
 drivers/staging/media/atomisp/i2c/ov2722.h         |   11 -
 drivers/staging/media/atomisp/i2c/ov5693/Kconfig   |    2 +-
 drivers/staging/media/atomisp/i2c/ov5693/ad5823.h  |    4 -
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c  |   40 +-
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.h  |   11 -
 drivers/staging/media/atomisp/i2c/ov8858.c         |   59 +-
 drivers/staging/media/atomisp/i2c/ov8858.h         |    5 -
 drivers/staging/media/atomisp/i2c/ov8858_btns.h    |    5 -
 .../staging/media/atomisp/include/linux/atomisp.h  |    4 -
 .../atomisp/include/linux/atomisp_gmin_platform.h  |    3 -
 .../media/atomisp/include/linux/atomisp_platform.h |   25 +-
 .../media/atomisp/include/linux/libmsrlisthelper.h |    4 -
 .../staging/media/atomisp/include/media/lm3554.h   |    5 -
 .../staging/media/atomisp/include/media/lm3642.h   |  153 -
 .../media/atomisp/pci/atomisp2/atomisp-regs.h      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_acc.c       |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_acc.h       |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_cmd.c       |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_cmd.h       |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_common.h    |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_compat.h    |    4 -
 .../atomisp/pci/atomisp2/atomisp_compat_css20.c    |    4 -
 .../atomisp/pci/atomisp2/atomisp_compat_css20.h    |    4 -
 .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.c  |    4 -
 .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.h  |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_csi2.c      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_csi2.h      |    4 -
 .../atomisp/pci/atomisp2/atomisp_dfs_tables.h      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_drvfs.c     |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_drvfs.h     |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_file.c      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_file.h      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_fops.c      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_fops.h      |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_helper.h    |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_internal.h  |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_ioctl.c     |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_ioctl.h     |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_subdev.c    |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_subdev.h    |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_tables.h    |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_tpg.c       |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_tpg.h       |    4 -
 .../atomisp/pci/atomisp2/atomisp_trace_event.h     |    4 -
 .../media/atomisp/pci/atomisp2/atomisp_v4l2.c      |   13 +-
 .../media/atomisp/pci/atomisp2/atomisp_v4l2.h      |    4 -
 .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c   |    4 -
 .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c        |    4 -
 .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c    |    4 -
 .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c   |    4 -
 .../media/atomisp/pci/atomisp2/hmm/hmm_vm.c        |    4 -
 .../atomisp2/hrt/hive_isp_css_custom_host_hrt.h    |    4 -
 .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c |    4 -
 .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h |    4 -
 .../media/atomisp/pci/atomisp2/include/hmm/hmm.h   |    4 -
 .../atomisp/pci/atomisp2/include/hmm/hmm_bo.h      |    4 -
 .../atomisp/pci/atomisp2/include/hmm/hmm_bo_dev.h  |    4 -
 .../atomisp/pci/atomisp2/include/hmm/hmm_common.h  |    4 -
 .../atomisp/pci/atomisp2/include/hmm/hmm_pool.h    |    4 -
 .../atomisp/pci/atomisp2/include/hmm/hmm_vm.h      |    4 -
 .../atomisp/pci/atomisp2/include/mmu/isp_mmu.h     |    4 -
 .../atomisp/pci/atomisp2/include/mmu/sh_mmu.h      |    4 -
 .../pci/atomisp2/include/mmu/sh_mmu_mrfld.h        |    4 -
 .../media/atomisp/pci/atomisp2/mmu/isp_mmu.c       |    4 -
 .../media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c  |    4 -
 .../platform/intel-mid/atomisp_gmin_platform.c     |   48 +-
 108 files changed, 56 insertions(+), 17290 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/i2c/ap1302.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/ap1302.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/Kconfig
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/Makefile
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/ad5816g.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/ad5816g.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/common.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/drv201.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/drv201.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/dw9714.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/dw9714.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/dw9718.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/dw9718.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/dw9719.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/dw9719.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx132.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx134.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx135.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx175.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx208.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx219.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/imx227.h
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/otp.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/otp_brcc064_e2prom.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/otp_e2prom.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/otp_imx.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/imx/vcm.c
 delete mode 100644 drivers/staging/media/atomisp/include/media/lm3642.h
Signature · 1 line
2.14.1
#3 lore raw

PATCH 4/13 staging: atomisp: Switch i2c drivers to use ->probe_new()

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.

---
 drivers/staging/media/atomisp/i2c/Kconfig            |  9 +++++++--
 drivers/staging/media/atomisp/i2c/gc0310.c           | 12 ++++--------
 drivers/staging/media/atomisp/i2c/gc0310.h           |  7 -------
 drivers/staging/media/atomisp/i2c/gc2235.c           | 13 +++++--------
 drivers/staging/media/atomisp/i2c/gc2235.h           |  7 -------
 drivers/staging/media/atomisp/i2c/lm3554.c           | 18 ++++--------------
 drivers/staging/media/atomisp/i2c/mt9m114.c          | 11 +++--------
 drivers/staging/media/atomisp/i2c/mt9m114.h          |  5 -----
 drivers/staging/media/atomisp/i2c/ov2680.c           | 14 ++++----------
 drivers/staging/media/atomisp/i2c/ov2680.h           | 10 ----------
 drivers/staging/media/atomisp/i2c/ov2722.c           | 13 ++++---------
 drivers/staging/media/atomisp/i2c/ov2722.h           |  7 -------
 drivers/staging/media/atomisp/i2c/ov5693/Kconfig     |  2 +-
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c    | 12 ++++--------
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.h    |  7 -------
 drivers/staging/media/atomisp/i2c/ov8858.c           | 20 +++++---------------
 drivers/staging/media/atomisp/i2c/ov8858.h           |  1 -
 drivers/staging/media/atomisp/i2c/ov8858_btns.h      |  1 -
 drivers/staging/media/atomisp/include/media/lm3554.h |  1 -
 19 files changed, 41 insertions(+), 129 deletions(-)
drivers/staging/media/atomisp/i2c/Kconfig +7 -2
index 4da028d919c5..74bd45e54d69 100644
@@ -6,6 +6,7 @@ source "drivers/staging/media/atomisp/i2c/ov5693/Kconfig"
 
 config VIDEO_OV2722
        tristate "OVT ov2722 sensor support"
+	depends on ACPI
        depends on I2C && VIDEO_V4L2
        ---help---
 	 This is a Video4Linux2 sensor-level driver for the OVT
@@ -17,6 +18,7 @@ config VIDEO_OV2722
 
 config VIDEO_GC2235
        tristate "Galaxy gc2235 sensor support"
+	depends on ACPI
        depends on I2C && VIDEO_V4L2
        ---help---
 	 This is a Video4Linux2 sensor-level driver for the OVT
@@ -28,6 +30,7 @@ config VIDEO_GC2235
 
 config VIDEO_OV8858
        tristate "Omnivision ov8858 sensor support"
+	depends on ACPI
        depends on I2C && VIDEO_V4L2 && VIDEO_ATOMISP
        ---help---
 	 This is a Video4Linux2 sensor-level driver for the Omnivision
@@ -49,6 +52,7 @@ config VIDEO_MSRLIST_HELPER
 
 config VIDEO_MT9M114
        tristate "Aptina mt9m114 sensor support"
+	depends on ACPI
        depends on I2C && VIDEO_V4L2
        ---help---
 	 This is a Video4Linux2 sensor-level driver for the Micron
@@ -60,6 +64,7 @@ config VIDEO_MT9M114
 
 config VIDEO_GC0310
 	tristate "GC0310 sensor support"
+	depends on ACPI
 	depends on I2C && VIDEO_V4L2
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the Galaxycore
@@ -67,6 +72,7 @@ config VIDEO_GC0310
 	 
 config VIDEO_OV2680
        tristate "Omnivision OV2680 sensor support"
+	depends on ACPI
        depends on I2C && VIDEO_V4L2
        ---help---
 	 This is a Video4Linux2 sensor-level driver for the Omnivision
@@ -82,6 +88,7 @@ config VIDEO_OV2680
 
 config VIDEO_LM3554
        tristate "LM3554 flash light driver"
+	depends on ACPI
        depends on VIDEO_V4L2 && I2C
        ---help---
 	 This is a Video4Linux2 sub-dev driver for the LM3554
@@ -89,5 +96,3 @@ config VIDEO_LM3554
 
 	 To compile this driver as a module, choose M here: the
 	 module will be called lm3554
-
-
drivers/staging/media/atomisp/i2c/gc0310.c +4 -8
index 730fa5dd80f5..6f54304f1ca0 100644
@@ -1375,8 +1375,7 @@ static int gc0310_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int gc0310_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int gc0310_probe(struct i2c_client *client)
 {
 	struct gc0310_device *dev;
 	int ret;
@@ -1457,18 +1456,15 @@ static const struct acpi_device_id gc0310_acpi_match[] = {
 	{"INT0310"},
 	{},
 };
-
 MODULE_DEVICE_TABLE(acpi, gc0310_acpi_match);
 
-MODULE_DEVICE_TABLE(i2c, gc0310_id);
 static struct i2c_driver gc0310_driver = {
 	.driver = {
-		.name = GC0310_NAME,
-		.acpi_match_table = ACPI_PTR(gc0310_acpi_match),
+		.name = "gc0310",
+		.acpi_match_table = gc0310_acpi_match,
 	},
-	.probe = gc0310_probe,
+	.probe_new = gc0310_probe,
 	.remove = gc0310_remove,
-	.id_table = gc0310_id,
 };
 module_i2c_driver(gc0310_driver);
 
drivers/staging/media/atomisp/i2c/gc0310.h +0 -7
index 7d8a0aeecb6c..7e97e45b4f79 100644
@@ -36,8 +36,6 @@
 
 #include "../include/linux/atomisp_platform.h"
 
-#define GC0310_NAME		"gc0310"
-
 /* Defines for register writes and register array processing */
 #define I2C_MSG_LENGTH		1
 #define I2C_RETRY_COUNT		5
@@ -196,11 +194,6 @@ struct gc0310_write_ctrl {
 	struct gc0310_write_buffer buffer;
 };
 
-static const struct i2c_device_id gc0310_id[] = {
-	{GC0310_NAME, 0},
-	{}
-};
-
 /*
  * Register settings for various resolution
  */
drivers/staging/media/atomisp/i2c/gc2235.c +5 -8
index 6d4a432b6bae..8ed12e16caf4 100644
@@ -1114,8 +1114,7 @@ static int gc2235_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int gc2235_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int gc2235_probe(struct i2c_client *client)
 {
 	struct gc2235_device *dev;
 	void *gcpdev;
@@ -1187,17 +1186,15 @@ static const struct acpi_device_id gc2235_acpi_match[] = {
 	{ "INT33F8" },
 	{},
 };
-
 MODULE_DEVICE_TABLE(acpi, gc2235_acpi_match);
-MODULE_DEVICE_TABLE(i2c, gc2235_id);
+
 static struct i2c_driver gc2235_driver = {
 	.driver = {
-		.name = GC2235_NAME,
-		.acpi_match_table = ACPI_PTR(gc2235_acpi_match),
+		.name = "gc2235",
+		.acpi_match_table = gc2235_acpi_match,
 	},
-	.probe = gc2235_probe,
+	.probe_new = gc2235_probe,
 	.remove = gc2235_remove,
-	.id_table = gc2235_id,
 };
 module_i2c_driver(gc2235_driver);
 
drivers/staging/media/atomisp/i2c/gc2235.h +0 -7
index a8d6aa9c9a5d..3c30a05c3991 100644
@@ -33,8 +33,6 @@
 
 #include "../include/linux/atomisp_platform.h"
 
-#define GC2235_NAME		"gc2235"
-
 /* Defines for register writes and register array processing */
 #define I2C_MSG_LENGTH		0x2
 #define I2C_RETRY_COUNT		5
@@ -200,11 +198,6 @@ struct gc2235_write_ctrl {
 	struct gc2235_write_buffer buffer;
 };
 
-static const struct i2c_device_id gc2235_id[] = {
-	{GC2235_NAME, 0},
-	{}
-};
-
 static struct gc2235_reg const gc2235_stream_on[] = {
 	{ GC2235_8BIT, 0xfe, 0x03}, /* switch to P3 */
 	{ GC2235_8BIT, 0x10, 0x91}, /* start mipi */
drivers/staging/media/atomisp/i2c/lm3554.c +4 -14
index 5424685eb447..f74380074177 100644
@@ -862,8 +862,7 @@ static void *lm3554_platform_data_func(struct i2c_client *client)
 	return &platform_data;
 }
 
-static int lm3554_probe(struct i2c_client *client,
-				  const struct i2c_device_id *id)
+static int lm3554_probe(struct i2c_client *client)
 {
 	int err = 0;
 	struct lm3554 *flash;
@@ -962,13 +961,6 @@ static int lm3554_remove(struct i2c_client *client)
 	return ret;
 }
 
-static const struct i2c_device_id lm3554_id[] = {
-	{LM3554_NAME, 0},
-	{},
-};
-
-MODULE_DEVICE_TABLE(i2c, lm3554_id);
-
 static const struct dev_pm_ops lm3554_pm_ops = {
 	.suspend = lm3554_suspend,
 	.resume = lm3554_resume,
@@ -978,18 +970,16 @@ static const struct acpi_device_id lm3554_acpi_match[] = {
 	{ "INTCF1C" },
 	{},
 };
-
 MODULE_DEVICE_TABLE(acpi, lm3554_acpi_match);
 
 static struct i2c_driver lm3554_driver = {
 	.driver = {
-		.name = LM3554_NAME,
+		.name = "lm3554",
 		.pm   = &lm3554_pm_ops,
-		.acpi_match_table = ACPI_PTR(lm3554_acpi_match),
+		.acpi_match_table = lm3554_acpi_match,
 	},
-	.probe = lm3554_probe,
+	.probe_new = lm3554_probe,
 	.remove = lm3554_remove,
-	.id_table = lm3554_id,
 };
 module_i2c_driver(lm3554_driver);
 
drivers/staging/media/atomisp/i2c/mt9m114.c +3 -8
index 14fe39f9feb6..8c75372782d8 100644
@@ -1853,8 +1853,7 @@ static int mt9m114_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int mt9m114_probe(struct i2c_client *client,
-		       const struct i2c_device_id *id)
+static int mt9m114_probe(struct i2c_client *client)
 {
 	struct mt9m114_device *dev;
 	int ret = 0;
@@ -1926,24 +1925,20 @@ static int mt9m114_probe(struct i2c_client *client,
 	return 0;
 }
 
-MODULE_DEVICE_TABLE(i2c, mt9m114_id);
-
 static const struct acpi_device_id mt9m114_acpi_match[] = {
 	{ "INT33F0" },
 	{ "CRMT1040" },
 	{},
 };
-
 MODULE_DEVICE_TABLE(acpi, mt9m114_acpi_match);
 
 static struct i2c_driver mt9m114_driver = {
 	.driver = {
 		.name = "mt9m114",
-		.acpi_match_table = ACPI_PTR(mt9m114_acpi_match),
+		.acpi_match_table = mt9m114_acpi_match,
 	},
-	.probe = mt9m114_probe,
+	.probe_new = mt9m114_probe,
 	.remove = mt9m114_remove,
-	.id_table = mt9m114_id,
 };
 module_i2c_driver(mt9m114_driver);
 
drivers/staging/media/atomisp/i2c/mt9m114.h +0 -5
index 5e7d79d2e01b..1ad1b1ac55e7 100644
@@ -394,11 +394,6 @@ static struct mt9m114_res_struct mt9m114_res[] = {
 };
 #define N_RES (ARRAY_SIZE(mt9m114_res))
 
-static const struct i2c_device_id mt9m114_id[] = {
-	{"mt9m114", 0},
-	{}
-};
-
 static struct misensor_reg const mt9m114_exitstandby[] = {
 	{MISENSOR_16BIT,  0x098E, 0xDC00},
 	/* exit-standby */
drivers/staging/media/atomisp/i2c/ov2680.c +4 -10
index 0dce3c03b2cd..99c6d699f899 100644
@@ -1438,8 +1438,7 @@ static int ov2680_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int ov2680_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int ov2680_probe(struct i2c_client *client)
 {
 	struct ov2680_device *dev;
 	int ret;
@@ -1523,21 +1522,16 @@ static const struct acpi_device_id ov2680_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, ov2680_acpi_match);
 
-
-MODULE_DEVICE_TABLE(i2c, ov2680_id);
 static struct i2c_driver ov2680_driver = {
 	.driver = {
-		.name = OV2680_NAME,
-		.acpi_match_table = ACPI_PTR(ov2680_acpi_match),
-
+		.name = "ov2680",
+		.acpi_match_table = ov2680_acpi_match,
 	},
-	.probe = ov2680_probe,
+	.probe_new = ov2680_probe,
 	.remove = ov2680_remove,
-	.id_table = ov2680_id,
 };
 module_i2c_driver(ov2680_driver);
 
 MODULE_AUTHOR("Jacky Wang <[email protected]>");
 MODULE_DESCRIPTION("A low-level driver for OmniVision 2680 sensors");
 MODULE_LICENSE("GPL");
-
drivers/staging/media/atomisp/i2c/ov2680.h +0 -10
index ab8907e6c9ef..198c158de3f2 100644
@@ -35,10 +35,6 @@
 
 #include "../include/linux/atomisp_platform.h"
 
-#define OV2680_NAME		"ov2680"
-#define OV2680B_NAME	"ov2680b"
-#define OV2680F_NAME	"ov2680f"
-
 /* Defines for register writes and register array processing */
 #define I2C_MSG_LENGTH		0x2
 #define I2C_RETRY_COUNT		5
@@ -227,12 +223,6 @@ struct ov2680_format {
 		struct ov2680_write_buffer buffer;
 	};
 
-	static const struct i2c_device_id ov2680_id[] = {
-		{OV2680B_NAME, 0},
-		{OV2680F_NAME, 0},
-		{}
-	};
-
 	static struct ov2680_reg const ov2680_global_setting[] = {
 	    {OV2680_8BIT, 0x0103, 0x01},
 	    {OV2680_8BIT, 0x3002, 0x00},
drivers/staging/media/atomisp/i2c/ov2722.c +4 -9
index c9b1b0cabe87..2481fda345c0 100644
@@ -1276,8 +1276,7 @@ static int __ov2722_init_ctrl_handler(struct ov2722_device *dev)
 	return 0;
 }
 
-static int ov2722_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int ov2722_probe(struct i2c_client *client)
 {
 	struct ov2722_device *dev;
 	void *ovpdev;
@@ -1335,23 +1334,19 @@ static int ov2722_probe(struct i2c_client *client,
 	return ret;
 }
 
-MODULE_DEVICE_TABLE(i2c, ov2722_id);
-
 static const struct acpi_device_id ov2722_acpi_match[] = {
 	{ "INT33FB" },
 	{},
 };
-
 MODULE_DEVICE_TABLE(acpi, ov2722_acpi_match);
 
 static struct i2c_driver ov2722_driver = {
 	.driver = {
-		.name = OV2722_NAME,
-		.acpi_match_table = ACPI_PTR(ov2722_acpi_match),
+		.name = "ov2722",
+		.acpi_match_table = ov2722_acpi_match,
 	},
-	.probe = ov2722_probe,
+	.probe_new = ov2722_probe,
 	.remove = ov2722_remove,
-	.id_table = ov2722_id,
 };
 module_i2c_driver(ov2722_driver);
 
drivers/staging/media/atomisp/i2c/ov2722.h +0 -7
index 73ecb1679718..3ee8eaadba49 100644
@@ -35,8 +35,6 @@
 
 #include "../include/linux/atomisp_platform.h"
 
-#define OV2722_NAME		"ov2722"
-
 #define OV2722_POWER_UP_RETRY_NUM 5
 
 /* Defines for register writes and register array processing */
@@ -257,11 +255,6 @@ struct ov2722_write_ctrl {
 	struct ov2722_write_buffer buffer;
 };
 
-static const struct i2c_device_id ov2722_id[] = {
-	{OV2722_NAME, 0},
-	{}
-};
-
 /*
  * Register settings for various resolution
  */
drivers/staging/media/atomisp/i2c/ov5693/Kconfig +1 -1
index 9e8d32521e7e..29b522237f39 100644
@@ -1,5 +1,6 @@
 config VIDEO_OV5693
        tristate "Omnivision ov5693 sensor support"
+	depends on ACPI
        depends on I2C && VIDEO_V4L2
        ---help---
 	 This is a Video4Linux2 sensor-level driver for the Micron
@@ -8,4 +9,3 @@ config VIDEO_OV5693
 	 ov5693 is video camera sensor.
 
 	 It currently only works with the atomisp driver.
-
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +4 -8
index 0aafe5c37cc0..a083c61ad3ea 100644
@@ -1935,8 +1935,7 @@ static int ov5693_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int ov5693_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int ov5693_probe(struct i2c_client *client)
 {
 	struct ov5693_device *dev;
 	int i2c;
@@ -2023,8 +2022,6 @@ static int ov5693_probe(struct i2c_client *client,
 	return ret;
 }
 
-MODULE_DEVICE_TABLE(i2c, ov5693_id);
-
 static const struct acpi_device_id ov5693_acpi_match[] = {
 	{"INT33BE"},
 	{},
@@ -2033,12 +2030,11 @@ MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match);
 
 static struct i2c_driver ov5693_driver = {
 	.driver = {
-		.name = OV5693_NAME,
-		.acpi_match_table = ACPI_PTR(ov5693_acpi_match),
+		.name = "ov5693",
+		.acpi_match_table = ov5693_acpi_match,
 	},
-	.probe = ov5693_probe,
+	.probe_new = ov5693_probe,
 	.remove = ov5693_remove,
-	.id_table = ov5693_id,
 };
 module_i2c_driver(ov5693_driver);
 
drivers/staging/media/atomisp/i2c/ov5693/ov5693.h +0 -7
index 8c2e6794463b..b94a72a300d4 100644
@@ -35,8 +35,6 @@
 
 #include "../../include/linux/atomisp_platform.h"
 
-#define OV5693_NAME		"ov5693"
-
 #define OV5693_POWER_UP_RETRY_NUM 5
 
 /* Defines for register writes and register array processing */
@@ -278,11 +276,6 @@ struct ov5693_write_ctrl {
 	struct ov5693_write_buffer buffer;
 };
 
-static const struct i2c_device_id ov5693_id[] = {
-	{OV5693_NAME, 0},
-	{}
-};
-
 static struct ov5693_reg const ov5693_global_setting[] = {
 	{OV5693_8BIT, 0x0103, 0x01},
 	{OV5693_8BIT, 0x3001, 0x0a},
drivers/staging/media/atomisp/i2c/ov8858.c +5 -15
index d0d16b9015d0..28f277fa2bc9 100644
@@ -2082,8 +2082,7 @@ static const struct v4l2_ctrl_config ctrls[] = {
 	}
 };
 
-static int ov8858_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int ov8858_probe(struct i2c_client *client)
 {
 	struct ov8858_device *dev;
 	unsigned int i;
@@ -2101,8 +2100,6 @@ static int ov8858_probe(struct i2c_client *client,
 
 	mutex_init(&dev->input_lock);
 
-	if (id)
-		dev->i2c_id = id->driver_data;
 	dev->fmt_idx = 0;
 	dev->sensor_id = OV_ID_DEFAULT;
 	dev->vcm_driver = &ov8858_vcms[OV8858_ID_DEFAULT];
@@ -2182,26 +2179,19 @@ static int ov8858_probe(struct i2c_client *client,
 	return ret;
 }
 
-static const struct i2c_device_id ov8858_id[] = {
-	{OV8858_NAME, 0},
-	{}
-};
-
-MODULE_DEVICE_TABLE(i2c, ov8858_id);
-
 static const struct acpi_device_id ov8858_acpi_match[] = {
 	{"INT3477"},
 	{},
 };
+MODULE_DEVICE_TABLE(acpi, ov8858_acpi_match);
 
 static struct i2c_driver ov8858_driver = {
 	.driver = {
-		.name = OV8858_NAME,
-		.acpi_match_table = ACPI_PTR(ov8858_acpi_match),
+		.name = "ov8858",
+		.acpi_match_table = ov8858_acpi_match,
 	},
-	.probe = ov8858_probe,
+	.probe_new = ov8858_probe,
 	.remove = ov8858_remove,
-	.id_table = ov8858_id,
 };
 module_i2c_driver(ov8858_driver);
 
drivers/staging/media/atomisp/i2c/ov8858.h +0 -1
index 638d1a803a2b..0f1b76e49a34 100644
@@ -113,7 +113,6 @@
 
 #define OV_SUBDEV_PREFIX			"ov"
 #define OV_ID_DEFAULT				0x0000
-#define	OV8858_NAME				"ov8858"
 #define OV8858_CHIP_ID				0x8858
 
 #define OV8858_LONG_EXPO			0x3500
drivers/staging/media/atomisp/i2c/ov8858_btns.h +0 -1
index 7d74a8899fae..5cf03c220876 100644
@@ -113,7 +113,6 @@
 
 #define OV_SUBDEV_PREFIX			"ov"
 #define OV_ID_DEFAULT				0x0000
-#define	OV8858_NAME				"ov8858"
 #define OV8858_CHIP_ID				0x8858
 
 #define OV8858_LONG_EXPO			0x3500
drivers/staging/media/atomisp/include/media/lm3554.h +0 -1
index 7d6a8c05dd52..df17d546f661 100644
@@ -24,7 +24,6 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-subdev.h>
 
-#define LM3554_NAME    "lm3554"
 #define LM3554_ID      3554
 
 #define	v4l2_queryctrl_entry_integer(_id, _name,\
Signature · 1 line
2.14.1
#4 lore raw

PATCH 5/13 staging: atomisp: Do not set GPIO twice

In reply to Andy Shevchenko

gpiod_get() configures GPIO line at the time of successful request. Thus, no need to do this explicitly.

---
 .../atomisp/platform/intel-mid/atomisp_gmin_platform.c     | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +2 -12
index 17b4cfae5abf..0c5d09bdb93a 100644
@@ -408,21 +408,11 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
 	if (!ret)
 		clk_disable_unprepare(gmin_subdevs[i].pmc_clk);
 
-	if (!IS_ERR(gmin_subdevs[i].gpio0)) {
-		ret = gpiod_direction_output(gmin_subdevs[i].gpio0, 0);
-		if (ret)
-			dev_err(dev, "gpio0 set output failed: %d\n", ret);
-	} else {
+	if (IS_ERR(gmin_subdevs[i].gpio0))
 		gmin_subdevs[i].gpio0 = NULL;
-	}
 
-	if (!IS_ERR(gmin_subdevs[i].gpio1)) {
-		ret = gpiod_direction_output(gmin_subdevs[i].gpio1, 0);
-		if (ret)
-			dev_err(dev, "gpio1 set output failed: %d\n", ret);
-	} else {
+	if (IS_ERR(gmin_subdevs[i].gpio1))
 		gmin_subdevs[i].gpio1 = NULL;
-	}
 
 	if (pmic_id == PMIC_REGULATOR) {
 		gmin_subdevs[i].v1p8_reg = regulator_get(dev, "V1P8SX");
Signature · 1 line
2.14.1
#5 lore raw

PATCH 6/13 staging: atomisp: Remove unneeded gpio.h inclusion

In reply to Andy Shevchenko

GPIO handling is done only in two modules, the rest do not need to include linux/gpio.h header.

---
 drivers/staging/media/atomisp/i2c/gc0310.c        | 1 -
 drivers/staging/media/atomisp/i2c/gc2235.c        | 1 -
 drivers/staging/media/atomisp/i2c/mt9m114.c       | 1 -
 drivers/staging/media/atomisp/i2c/ov2680.c        | 1 -
 drivers/staging/media/atomisp/i2c/ov2722.c        | 1 -
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 1 -
 6 files changed, 6 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +0 -1
index 6f54304f1ca0..0e6fcf44b656 100644
@@ -26,7 +26,6 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/moduleparam.h>
 #include <media/v4l2-device.h>
 #include <linux/io.h>
drivers/staging/media/atomisp/i2c/gc2235.c +0 -1
index 8ed12e16caf4..94b93ccc6aeb 100644
@@ -26,7 +26,6 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/moduleparam.h>
 #include <media/v4l2-device.h>
 #include "../include/linux/atomisp_gmin_platform.h"
drivers/staging/media/atomisp/i2c/mt9m114.c +0 -1
index 8c75372782d8..4ac1ad045283 100644
@@ -32,7 +32,6 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/acpi.h>
 #include "../include/linux/atomisp_gmin_platform.h"
 #include <media/v4l2-device.h>
drivers/staging/media/atomisp/i2c/ov2680.c +0 -1
index 99c6d699f899..a42adeeb748c 100644
@@ -26,7 +26,6 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/moduleparam.h>
 #include <media/v4l2-device.h>
 #include <linux/io.h>
drivers/staging/media/atomisp/i2c/ov2722.c +0 -1
index 2481fda345c0..1b7012f47303 100644
@@ -26,7 +26,6 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/moduleparam.h>
 #include <media/v4l2-device.h>
 #include "../include/linux/atomisp_gmin_platform.h"
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +0 -1
index a083c61ad3ea..357821af4db0 100644
@@ -31,7 +31,6 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/moduleparam.h>
 #include <media/v4l2-device.h>
 #include <linux/io.h>
Signature · 1 line
2.14.1
#8 lore raw

PATCH 9/13 staging: atomisp: Remove unused members of camera_sensor_platform_data

In reply to Andy Shevchenko

Remove unused members along with dead code.

Mostly done with help of coccinelle.

---
 drivers/staging/media/atomisp/i2c/gc0310.c                  | 13 -------------
 drivers/staging/media/atomisp/i2c/gc2235.c                  | 13 -------------
 drivers/staging/media/atomisp/i2c/mt9m114.c                 |  9 ---------
 drivers/staging/media/atomisp/i2c/ov2722.c                  | 13 -------------
 drivers/staging/media/atomisp/i2c/ov8858.c                  | 13 -------------
 .../staging/media/atomisp/include/linux/atomisp_platform.h  |  5 -----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c   |  9 +--------
 .../atomisp/platform/intel-mid/atomisp_gmin_platform.c      | 12 ------------
 8 files changed, 1 insertion(+), 86 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +0 -13
index b6b1956293c0..0b32c8a94e5c 100644
@@ -1156,13 +1156,6 @@ static int gc0310_s_config(struct v4l2_subdev *sd,
 		(struct camera_sensor_platform_data *)platform_data;
 
 	mutex_lock(&dev->input_lock);
-	if (dev->platform_data->platform_init) {
-		ret = dev->platform_data->platform_init(client);
-		if (ret) {
-			dev_err(&client->dev, "platform init err\n");
-			goto platform_init_failed;
-		}
-	}
 	/* power off the module, then power on it in future
 	 * as first power on by board may not fulfill the
 	 * power on sequqence needed by the module
@@ -1207,9 +1200,6 @@ static int gc0310_s_config(struct v4l2_subdev *sd,
 	power_down(sd);
 	dev_err(&client->dev, "sensor power-gating failed\n");
 fail_power_off:
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
-platform_init_failed:
 	mutex_unlock(&dev->input_lock);
 	return ret;
 }
@@ -1353,9 +1343,6 @@ static int gc0310_remove(struct i2c_client *client)
 	struct gc0310_device *dev = to_gc0310_sensor(sd);
 	dev_dbg(&client->dev, "gc0310_remove...\n");
 
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
-
 	dev->platform_data->csi_cfg(sd, 0);
 
 	v4l2_device_unregister_subdev(sd);
drivers/staging/media/atomisp/i2c/gc2235.c +0 -13
index 46e063dcdc19..bcfcdc220803 100644
@@ -897,13 +897,6 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
 		(struct camera_sensor_platform_data *)platform_data;
 
 	mutex_lock(&dev->input_lock);
-	if (dev->platform_data->platform_init) {
-		ret = dev->platform_data->platform_init(client);
-		if (ret) {
-			dev_err(&client->dev, "platform init err\n");
-			goto platform_init_failed;
-		}
-	}
 	/* power off the module, then power on it in future
 	 * as first power on by board may not fulfill the
 	 * power on sequqence needed by the module
@@ -947,9 +940,6 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
 	power_down(sd);
 	dev_err(&client->dev, "sensor power-gating failed\n");
 fail_power_off:
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
-platform_init_failed:
 	mutex_unlock(&dev->input_lock);
 	return ret;
 }
@@ -1092,9 +1082,6 @@ static int gc2235_remove(struct i2c_client *client)
 	struct gc2235_device *dev = to_gc2235_sensor(sd);
 	dev_dbg(&client->dev, "gc2235_remove...\n");
 
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
-
 	dev->platform_data->csi_cfg(sd, 0);
 
 	v4l2_device_unregister_subdev(sd);
drivers/staging/media/atomisp/i2c/mt9m114.c +0 -9
index 950627efa977..09018d5ccaf2 100644
@@ -1575,13 +1575,6 @@ mt9m114_s_config(struct v4l2_subdev *sd, int irq, void *platform_data)
 	dev->platform_data =
 	    (struct camera_sensor_platform_data *)platform_data;
 
-	if (dev->platform_data->platform_init) {
-		ret = dev->platform_data->platform_init(client);
-		if (ret) {
-			v4l2_err(client, "mt9m114 platform init err\n");
-			return ret;
-		}
-	}
 	ret = power_up(sd);
 	if (ret) {
 		v4l2_err(client, "mt9m114 power-up err");
@@ -1835,8 +1828,6 @@ static int mt9m114_remove(struct i2c_client *client)
 
 	dev = container_of(sd, struct mt9m114_device, sd);
 	dev->platform_data->csi_cfg(sd, 0);
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
 	v4l2_device_unregister_subdev(sd);
 	media_entity_cleanup(&dev->sd.entity);
 	v4l2_ctrl_handler_free(&dev->ctrl_handler);
drivers/staging/media/atomisp/i2c/ov2722.c +0 -13
index 39296a784162..c348a93c4100 100644
@@ -1035,13 +1035,6 @@ static int ov2722_s_config(struct v4l2_subdev *sd,
 		(struct camera_sensor_platform_data *)platform_data;
 
 	mutex_lock(&dev->input_lock);
-	if (dev->platform_data->platform_init) {
-		ret = dev->platform_data->platform_init(client);
-		if (ret) {
-			dev_err(&client->dev, "platform init err\n");
-			goto platform_init_failed;
-		}
-	}
 
 	/* power off the module, then power on it in future
 	 * as first power on by board may not fulfill the
@@ -1086,9 +1079,6 @@ static int ov2722_s_config(struct v4l2_subdev *sd,
 	power_down(sd);
 	dev_err(&client->dev, "sensor power-gating failed\n");
 fail_power_off:
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
-platform_init_failed:
 	mutex_unlock(&dev->input_lock);
 	return ret;
 }
@@ -1232,9 +1222,6 @@ static int ov2722_remove(struct i2c_client *client)
 	struct ov2722_device *dev = to_ov2722_sensor(sd);
 	dev_dbg(&client->dev, "ov2722_remove...\n");
 
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
-
 	dev->platform_data->csi_cfg(sd, 0);
 	v4l2_ctrl_handler_free(&dev->ctrl_handler);
 	v4l2_device_unregister_subdev(sd);
drivers/staging/media/atomisp/i2c/ov8858.c +0 -13
index a13bbfb44652..51bda5c73128 100644
@@ -1567,15 +1567,6 @@ static int ov8858_s_config(struct v4l2_subdev *sd,
 
 	mutex_lock(&dev->input_lock);
 
-	if (dev->platform_data->platform_init) {
-		ret = dev->platform_data->platform_init(client);
-		if (ret) {
-			mutex_unlock(&dev->input_lock);
-			dev_err(&client->dev, "platform init error %d!\n", ret);
-			return ret;
-		}
-	}
-
 	ret = __ov8858_s_power(sd, 1);
 	if (ret) {
 		dev_err(&client->dev, "power-up error %d!\n", ret);
@@ -1620,8 +1611,6 @@ static int ov8858_s_config(struct v4l2_subdev *sd,
 fail_csi_cfg:
 	__ov8858_s_power(sd, 0);
 fail_update:
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
 	mutex_unlock(&dev->input_lock);
 	dev_err(&client->dev, "sensor power-gating failed\n");
 	return ret;
@@ -1922,8 +1911,6 @@ static int ov8858_remove(struct i2c_client *client)
 {
 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
 	struct ov8858_device *dev = to_ov8858_sensor(sd);
-	if (dev->platform_data->platform_deinit)
-		dev->platform_data->platform_deinit();
 
 	media_entity_cleanup(&dev->sd.entity);
 	v4l2_ctrl_handler_free(&dev->ctrl_handler);
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +0 -5
index 5ce8678dacf3..a8c1825e1d0d 100644
@@ -207,11 +207,6 @@ struct camera_vcm_control {
 struct camera_sensor_platform_data {
 	int (*flisclk_ctrl)(struct v4l2_subdev *subdev, int flag);
 	int (*csi_cfg)(struct v4l2_subdev *subdev, int flag);
-	bool (*low_fps)(void);
-	int (*platform_init)(struct i2c_client *);
-	int (*platform_deinit)(void);
-	char *(*msr_file_name)(void);
-	struct atomisp_camera_caps *(*get_camera_caps)(void);
 
 	/*
 	 * New G-Min power and GPIO interface to control individual
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +1 -8
index e85b3819bffa..5a6dd3789acd 100644
@@ -750,7 +750,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
 			&subdevs->v4l2_subdev.board_info;
 		struct i2c_adapter *adapter =
 			i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
-		struct camera_sensor_platform_data *sensor_pdata;
 		int sensor_num, i;
 
 		if (adapter == NULL) {
@@ -802,13 +801,7 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
 			 * pixel_format.
 			 */
 			isp->inputs[isp->input_cnt].frame_size.pixel_format = 0;
-			sensor_pdata = (struct camera_sensor_platform_data *)
-					board_info->platform_data;
-			if (sensor_pdata->get_camera_caps)
-				isp->inputs[isp->input_cnt].camera_caps =
-					sensor_pdata->get_camera_caps();
-			else
-				isp->inputs[isp->input_cnt].camera_caps =
+			isp->inputs[isp->input_cnt].camera_caps =
 					atomisp_get_default_camera_caps();
 			sensor_num = isp->inputs[isp->input_cnt]
 				.camera_caps->sensor_num;
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +0 -12
index 0c5d09bdb93a..3f7814a3a5a4 100644
@@ -331,16 +331,6 @@ static const struct {
 
 #define CFG_VAR_NAME_MAX 64
 
-static int gmin_platform_init(struct i2c_client *client)
-{
-	return 0;
-}
-
-static int gmin_platform_deinit(void)
-{
-	return 0;
-}
-
 #define GMIN_PMC_CLK_NAME 14 /* "pmc_plt_clk_[0..5]" */
 static char gmin_pmc_clk_name[GMIN_PMC_CLK_NAME];
 
@@ -621,8 +611,6 @@ static struct camera_sensor_platform_data gmin_plat = {
 	.v2p8_ctrl = gmin_v2p8_ctrl,
 	.v1p2_ctrl = gmin_v1p2_ctrl,
 	.flisclk_ctrl = gmin_flisclk_ctrl,
-	.platform_init = gmin_platform_init,
-	.platform_deinit = gmin_platform_deinit,
 	.csi_cfg = gmin_csi_cfg,
 	.get_vcm_ctrl = gmin_get_vcm_ctrl,
 };
Signature · 1 line
2.14.1
#11 lore raw

PATCH 11/13 staging: atomisp: Remove Gmin dead code #2

In reply to Andy Shevchenko

media/lm3642.h is not used anywhere. Moreover, there is a driver under LEDs framework for very same IP which would be used anyway.

---
 .../staging/media/atomisp/include/media/lm3642.h   | 153 ---------------------
 1 file changed, 153 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/include/media/lm3642.h
drivers/staging/media/atomisp/include/media/lm3642.h deleted +0 -153
deleted file mode 100644
index 545d95763335..000000000000
@@ -1,153 +0,0 @@
-/*
- * include/media/lm3642.h
- *
- * Copyright (c) 2010-2012 Intel Corporation. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version
- * 2 as published by the Free Software Foundation.
- *
- * 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.
- */
-
-#ifndef _LM3642_H_
-#define _LM3642_H_
-
-#include <linux/videodev2.h>
-#include <media/v4l2-subdev.h>
-
-#define LM3642_NAME    "lm3642"
-#define LM3642_ID      3642
-
-#define	v4l2_queryctrl_entry_integer(_id, _name,\
-		_minimum, _maximum, _step, \
-		_default_value, _flags)	\
-	{\
-		.id = (_id), \
-		.type = V4L2_CTRL_TYPE_INTEGER, \
-		.name = _name, \
-		.minimum = (_minimum), \
-		.maximum = (_maximum), \
-		.step = (_step), \
-		.default_value = (_default_value),\
-		.flags = (_flags),\
-	}
-#define	v4l2_queryctrl_entry_boolean(_id, _name,\
-		_default_value, _flags)	\
-	{\
-		.id = (_id), \
-		.type = V4L2_CTRL_TYPE_BOOLEAN, \
-		.name = _name, \
-		.minimum = 0, \
-		.maximum = 1, \
-		.step = 1, \
-		.default_value = (_default_value),\
-		.flags = (_flags),\
-	}
-
-#define	s_ctrl_id_entry_integer(_id, _name, \
-		_minimum, _maximum, _step, \
-		_default_value, _flags, \
-		_s_ctrl, _g_ctrl)	\
-	{\
-		.qc = v4l2_queryctrl_entry_integer(_id, _name,\
-				_minimum, _maximum, _step,\
-				_default_value, _flags), \
-		.s_ctrl = _s_ctrl, \
-		.g_ctrl = _g_ctrl, \
-	}
-
-#define	s_ctrl_id_entry_boolean(_id, _name, \
-		_default_value, _flags, \
-		_s_ctrl, _g_ctrl)	\
-	{\
-		.qc = v4l2_queryctrl_entry_boolean(_id, _name,\
-				_default_value, _flags), \
-		.s_ctrl = _s_ctrl, \
-		.g_ctrl = _g_ctrl, \
-	}
-
-
-/* Default Values */
-#define LM3642_DEFAULT_TIMEOUT           300U
-#define LM3642_DEFAULT_RAMP_TIME	 0x10 /* 1.024ms */
-#define LM3642_DEFAULT_INDICATOR_CURRENT 0x01 /* 1.88A */
-#define LM3642_DEFAULT_FLASH_CURRENT	 0x0f /* 1500mA */
-
-/* Value settings for Flash Time-out Duration*/
-#define LM3642_MIN_TIMEOUT              100U
-#define LM3642_MAX_TIMEOUT              800U
-#define LM3642_TIMEOUT_STEPSIZE         100U
-
-/* Flash modes */
-#define LM3642_MODE_SHUTDOWN            0
-#define LM3642_MODE_INDICATOR           1
-#define LM3642_MODE_TORCH               2
-#define LM3642_MODE_FLASH               3
-
-/* timer delay time */
-#define LM3642_TIMER_DELAY		5
-
-/* Percentage <-> value macros */
-#define LM3642_MIN_PERCENT                   0U
-#define LM3642_MAX_PERCENT                   100U
-#define LM3642_CLAMP_PERCENTAGE(val) \
-	clamp(val, LM3642_MIN_PERCENT, LM3642_MAX_PERCENT)
-
-#define LM3642_VALUE_TO_PERCENT(v, step) \
-	(((((unsigned long)((v)+1))*(step))+50)/100)
-#define LM3642_PERCENT_TO_VALUE(p, step) \
-	(((((unsigned long)(p))*100)+((step)>>1))/(step)-1)
-
-/* Product specific limits
- * TODO: get these from platform data */
-#define LM3642_FLASH_MAX_LVL   0x0F /* 1500mA */
-#define LM3642_TORCH_MAX_LVL   0x07 /* 187mA */
-#define LM3642_INDICATOR_MAX_LVL   0x01 /* 1.88A */
-
-/* Flash brightness, input is percentage, output is [0..15] */
-#define LM3642_FLASH_STEP	\
-	((100ul*(LM3642_MAX_PERCENT) \
-	+((LM3642_FLASH_MAX_LVL+1)>>1)) \
-	/((LM3642_FLASH_MAX_LVL+1)))
-#define LM3642_FLASH_DEFAULT_BRIGHTNESS \
-	LM3642_VALUE_TO_PERCENT(15, LM3642_FLASH_STEP)
-
-/* Torch brightness, input is percentage, output is [0..7] */
-#define LM3642_TORCH_STEP	\
-	((100ul*(LM3642_MAX_PERCENT) \
-	+((LM3642_TORCH_MAX_LVL+1)>>1)) \
-	/((LM3642_TORCH_MAX_LVL+1)))
-#define LM3642_TORCH_DEFAULT_BRIGHTNESS \
-	LM3642_VALUE_TO_PERCENT(0, LM3642_TORCH_STEP)
-
-/* Indicator brightness, input is percentage, output is [0..1] */
-#define LM3642_INDICATOR_STEP	\
-	((100ul*(LM3642_MAX_PERCENT) \
-	+((LM3642_INDICATOR_MAX_LVL+1)>>1)) \
-	/((LM3642_INDICATOR_MAX_LVL+1)))
-#define LM3642_INDICATOR_DEFAULT_BRIGHTNESS \
-	LM3642_VALUE_TO_PERCENT(1, LM3642_INDICATOR_STEP)
-
-/*
- * lm3642_platform_data - Flash controller platform data
- */
-struct lm3642_platform_data {
-	int gpio_torch;
-	int gpio_strobe;
-	int (*power_ctrl)(struct v4l2_subdev *subdev, int on);
-
-	unsigned int torch_en;
-	unsigned int flash_en;
-	unsigned int tx_en;
-	unsigned int ivfm_en;
-};
-
-#endif /* _LM3642_H_ */
-
Signature · 1 line
2.14.1
#12 lore raw

PATCH 12/13 staging: atomisp: Remove duplicate declaration in header

In reply to Andy Shevchenko

There are 3 declarations that are present in atomisp_platform.h and atomisp_gmin_platform.h. Remove duplications from the latter.

---
 drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h +0 -3
index 5390b97ac6e7..7e3ca12dd4e9 100644
@@ -17,9 +17,6 @@
 
 #include "atomisp_platform.h"
 
-const struct atomisp_camera_caps *atomisp_get_default_camera_caps(void);
-const struct atomisp_platform_data *atomisp_get_platform_data(void);
-const struct camera_af_platform_data *camera_get_af_platform_data(void);
 int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
                                 struct camera_sensor_platform_data *plat_data,
                                 enum intel_v4l2_subdev_type type);
Signature · 1 line
2.14.1
#13 lore raw

PATCH 13/13 staging: atomisp: Remove FSF snail address

In reply to Andy 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.

---
 drivers/staging/media/atomisp/i2c/gc0310.h                            | 4 ----
 drivers/staging/media/atomisp/i2c/libmsrlisthelper.c                  | 4 ----
 drivers/staging/media/atomisp/i2c/lm3554.c                            | 4 ----
 drivers/staging/media/atomisp/i2c/mt9m114.c                           | 4 ----
 drivers/staging/media/atomisp/i2c/mt9m114.h                           | 4 ----
 drivers/staging/media/atomisp/i2c/ov2680.h                            | 4 ----
 drivers/staging/media/atomisp/i2c/ov2722.h                            | 4 ----
 drivers/staging/media/atomisp/i2c/ov5693/ad5823.h                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.h                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov8858.c                            | 4 ----
 drivers/staging/media/atomisp/i2c/ov8858.h                            | 4 ----
 drivers/staging/media/atomisp/i2c/ov8858_btns.h                       | 4 ----
 drivers/staging/media/atomisp/include/linux/atomisp.h                 | 4 ----
 drivers/staging/media/atomisp/include/linux/atomisp_platform.h        | 4 ----
 drivers/staging/media/atomisp/include/linux/libmsrlisthelper.h        | 4 ----
 drivers/staging/media/atomisp/include/media/lm3554.h                  | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp-regs.h             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.h              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_common.h           | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h           | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c     | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.h     | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c   | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h   | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.h             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_dfs_tables.h       | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c            | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.h            | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.c             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.h             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.h             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_helper.h           | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h         | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c            | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.h            | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c           | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h           | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_tables.h           | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.h              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_trace_event.h      | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.h             | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c                  | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c               | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c     | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c    | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c               | 4 ----
 .../media/atomisp/pci/atomisp2/hrt/hive_isp_css_custom_host_hrt.h     | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c  | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h  | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm.h          | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo.h       | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo_dev.h   | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_common.h   | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_pool.h     | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_vm.h       | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h      | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/mmu/sh_mmu.h       | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/include/mmu/sh_mmu_mrfld.h | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c              | 4 ----
 drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c         | 4 ----
 68 files changed, 272 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.h +0 -4
index 7e97e45b4f79..c422d0398fc7 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/libmsrlisthelper.c +0 -4
index decb65cfd7c9..81e5ec0c2b64 100644
@@ -10,10 +10,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #include <linux/i2c.h>
drivers/staging/media/atomisp/i2c/lm3554.c +0 -4
index f74380074177..36bfc385ee65 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #include <linux/module.h>
drivers/staging/media/atomisp/i2c/mt9m114.c +0 -4
index 09018d5ccaf2..f327f5b7c874 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/mt9m114.h +0 -4
index 1ad1b1ac55e7..0af79d77a404 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov2680.h +0 -4
index 198c158de3f2..bf4897347df7 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov2722.h +0 -4
index 3ee8eaadba49..d8a973d71699 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov5693/ad5823.h +0 -4
index 2dd894989cd9..4de44569fe54 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +0 -4
index 33651ec0218f..a7f6336689ae 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov5693/ov5693.h +0 -4
index b94a72a300d4..2ea63807c56d 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov8858.c +0 -4
index 51bda5c73128..534812391155 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov8858.h +0 -4
index 0f1b76e49a34..6c89568bb44e 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/i2c/ov8858_btns.h +0 -4
index 5cf03c220876..f81851306832 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/include/linux/atomisp.h +0 -4
index d67dd658cff9..b5533197226d 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifdef CSS15
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +0 -4
index 2dae4935ed75..e0f0c379e7ce 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef ATOMISP_PLATFORM_H_
drivers/staging/media/atomisp/include/linux/libmsrlisthelper.h +0 -4
index 589f4eae38ca..8988b37943b3 100644
@@ -10,10 +10,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef __LIBMSRLISTHELPER_H__
drivers/staging/media/atomisp/include/media/lm3554.h +0 -4
index df17d546f661..9276ce44d907 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef _LM3554_H_
drivers/staging/media/atomisp/pci/atomisp2/atomisp-regs.h +0 -4
index 513a430ee01a..5d102a4f8aff 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c +0 -4
index 1eac329339b7..a6638edee360 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.h +0 -4
index 5b58e7d9ca5b..56386154643b 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +0 -4
index b0c647f4d250..998d3a06477b 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #include <linux/firmware.h>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h +0 -4
index 31ba4e613d13..429cadbbb809 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_common.h +0 -4
index 69d1526da362..2558193045a6 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h +0 -4
index fb8b8fab4e92..3ef850cd25bd 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c +0 -4
index 05897b747349..a86c764c5e9c 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.h +0 -4
index b62ad9082018..b03711668eda 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c +0 -4
index 0592ac1f2832..44c21813a06e 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifdef CONFIG_COMPAT
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h +0 -4
index 750478f614d6..685da0f48bab 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef __ATOMISP_COMPAT_IOCTL32_H__
drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c +0 -4
index 2c5036685447..fa03b78c3580 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.h +0 -4
index faa9cf7e05c0..0191d28a55bc 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef __ATOMISP_CSI2_H__
drivers/staging/media/atomisp/pci/atomisp2/atomisp_dfs_tables.h +0 -4
index 204d941cdb6c..54e28605b5de 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef	__ATOMISP_DFS_TABLES_H__
drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c +0 -4
index 9f74b2dcbfaf..7129b88456cb 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.h +0 -4
index 5cb717b0c1c2..b91bfef21639 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.c +0 -4
index c766119bf798..377ec2a9fa6d 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.h +0 -4
index 1b86abd35c38..61fdeb5ee60a 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c +0 -4
index d8cfed358d55..abe71433a353 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.h +0 -4
index 8471e391501a..2faab3429d43 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_helper.h +0 -4
index e9650cb75ba5..55ba185b43a0 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef _atomisp_helper_h_
drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h +0 -4
index 6c1eb417361d..52a6f8002048 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef __ATOMISP_INTERNAL_H__
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c +0 -4
index dd59167237c1..9609a06b5fcb 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.h +0 -4
index fb5fadb5332b..0d2785b9ef99 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c +0 -4
index d27a50e66be2..70b53988553c 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #include <linux/module.h>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h +0 -4
index ba5c2ab14253..f3d61827ae8c 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef __ATOMISP_SUBDEV_H__
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tables.h +0 -4
index af09218d8b71..319ded6a96da 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef	__ATOMISP_TABLES_H__
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c +0 -4
index 48b96048cab4..b71cc7bcdbab 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.h +0 -4
index 64ab60f02e85..af354c4bfd3e 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_trace_event.h +0 -4
index 5ce282d6c939..462b296554c7 100644
@@ -12,10 +12,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #undef TRACE_SYSTEM
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +0 -4
index 5a6dd3789acd..22e043963ec7 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #include <linux/module.h>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.h +0 -4
index 191b2e57a810..944a6cf40a2f 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c +0 -4
index b8aae4ba5a78..a1c81c12718c 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +0 -4
index e6ddfbf0c4e2..60a3741d2231 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c +0 -4
index 19e0e9ee37de..d5c1b8975fff 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c +0 -4
index bf6586805f7f..f8b2dc85f1a4 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c +0 -4
index 0722a68a49e7..23b44f26730e 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_custom_host_hrt.h +0 -4
index 46a5d29e2d3a..fb38fc540b81 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef _hive_isp_css_custom_host_hrt_h_
drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c +0 -4
index 2e78976bb2ac..a94958bde718 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h +0 -4
index 1328944a7afd..15c2dfb6794e 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm.h +0 -4
index 6b9fb1b2caaf..1e135c7c6d9b 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo.h +0 -4
index dffd6e9cf693..bd44ebbc427c 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo_dev.h +0 -4
index a9446adb4c70..9e51a657ece4 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_common.h +0 -4
index f1593aa38ce1..00885203fb14 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_pool.h +0 -4
index 1ba360433d88..bf24e44462bc 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef __HMM_POOL_H__
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_vm.h +0 -4
index 07d40662de32..52098161082d 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h +0 -4
index 6b4eefc929e2..560014add005 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/include/mmu/sh_mmu.h +0 -4
index 06041e94cbb2..031c0398bf65 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #ifndef	SH_MMU_H_
drivers/staging/media/atomisp/pci/atomisp2/include/mmu/sh_mmu_mrfld.h +0 -4
index b9bad9f06235..662e98f41da2 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 
drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c +0 -4
index 706bd43e8b1b..e36c2a33b41a 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 /*
drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c +0 -4
index 97546bd124cd..c59bcc982966 100644
@@ -14,10 +14,6 @@
  * 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., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
  *
  */
 #include "type_support.h"
Signature · 1 line
2.14.1
#6 lore raw

PATCH 7/13 staging: atomisp: Remove ->gpio_ctrl() callback

In reply to Andy 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.

---
 drivers/staging/media/atomisp/i2c/gc0310.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/gc2235.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/mt9m114.c                    | 4 ----
 drivers/staging/media/atomisp/i2c/ov2680.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov2722.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c              | 4 ----
 drivers/staging/media/atomisp/i2c/ov8858.c                     | 4 ----
 drivers/staging/media/atomisp/include/linux/atomisp_platform.h | 2 --
 8 files changed, 30 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +0 -4
index 0e6fcf44b656..672a28c060f6 100644
@@ -771,10 +771,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	/* GPIO0 == "reset" (active low), GPIO1 == "power down" */
 	if (flag) {
 		/* Pulse reset, then release power down */
drivers/staging/media/atomisp/i2c/gc2235.c +0 -4
index 94b93ccc6aeb..81b23b55f73a 100644
@@ -571,10 +571,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	ret |= dev->platform_data->gpio1_ctrl(sd, !flag);
 	usleep_range(60, 90);
 	return dev->platform_data->gpio0_ctrl(sd, flag);
drivers/staging/media/atomisp/i2c/mt9m114.c +0 -4
index 4ac1ad045283..4968deae2525 100644
@@ -480,10 +480,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	/* Note: current modules wire only one GPIO signal (RESET#),
 	 * but the schematic wires up two to the connector.  BIOS
 	 * versions have been unfortunately inconsistent with which
drivers/staging/media/atomisp/i2c/ov2680.c +0 -4
index a42adeeb748c..162150055770 100644
@@ -871,10 +871,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	/* The OV2680 documents only one GPIO input (#XSHUTDN), but
 	 * existing integrations often wire two (reset/power_down)
 	 * because that is the way other sensors work.  There is no
drivers/staging/media/atomisp/i2c/ov2722.c +0 -4
index 1b7012f47303..6c1057542aea 100644
@@ -677,10 +677,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	/* Note: the GPIO order is asymmetric: always RESET#
 	 * before PWDN# when turning it on or off.
 	 */
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +0 -4
index 357821af4db0..8d5b4c3ea55d 100644
@@ -1332,10 +1332,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	return dev->platform_data->gpio0_ctrl(sd, flag);
 }
 
drivers/staging/media/atomisp/i2c/ov8858.c +0 -4
index 28f277fa2bc9..c00e5b37139f 100644
@@ -769,10 +769,6 @@ static int __gpio_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!client || !dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->gpio_ctrl)
-		return dev->platform_data->gpio_ctrl(sd, flag);
-
 	if (dev->platform_data->gpio0_ctrl)
 		return dev->platform_data->gpio0_ctrl(sd, flag);
 
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +0 -2
index dbac2b777dad..94ddb46d415b 100644
@@ -205,7 +205,6 @@ struct camera_vcm_control {
 };
 
 struct camera_sensor_platform_data {
-	int (*gpio_ctrl)(struct v4l2_subdev *subdev, int flag);
 	int (*flisclk_ctrl)(struct v4l2_subdev *subdev, int flag);
 	int (*power_ctrl)(struct v4l2_subdev *subdev, int flag);
 	int (*csi_cfg)(struct v4l2_subdev *subdev, int flag);
@@ -214,7 +213,6 @@ struct camera_sensor_platform_data {
 	int (*platform_deinit)(void);
 	char *(*msr_file_name)(void);
 	struct atomisp_camera_caps *(*get_camera_caps)(void);
-	int (*gpio_intr_ctrl)(struct v4l2_subdev *subdev);
 
 	/* New G-Min power and GPIO interface, replaces
 	 * power/gpio_ctrl with methods to control individual
Signature · 1 line
2.14.1
#9 lore raw

PATCH 10/13 staging: atomisp: Remove Gmin dead code #1

In reply to Andy Shevchenko

struct camera_af_platform_data and bound functions are not used anywhere.

---
 .../media/atomisp/include/linux/atomisp_platform.h |  6 ------
 .../platform/intel-mid/atomisp_gmin_platform.c     | 22 ----------------------
 2 files changed, 28 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +0 -6
index a8c1825e1d0d..2dae4935ed75 100644
@@ -221,12 +221,6 @@ struct camera_sensor_platform_data {
 						    char *module_id);
 };
 
-struct camera_af_platform_data {
-	int (*power_ctrl)(struct v4l2_subdev *subdev, int flag);
-};
-
-const struct camera_af_platform_data *camera_get_af_platform_data(void);
-
 struct camera_mipi_info {
 	enum atomisp_camera_port        port;
 	unsigned int                    num_lanes;
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +0 -22
index 3f7814a3a5a4..d9db0b13f506 100644
@@ -126,28 +126,6 @@ static int af_power_ctrl(struct v4l2_subdev *subdev, int flag)
 	return 0;
 }
 
-/*
- * Used in a handful of modules.  Focus motor control, I think.  Note
- * that there is no configurability in the API, so this needs to be
- * fixed where it is used.
- *
- * struct camera_af_platform_data {
- *     int (*power_ctrl)(struct v4l2_subdev *subdev, int flag);
- * };
- *
- * Note that the implementation in MCG platform_camera.c is stubbed
- * out anyway (i.e. returns zero from the callback) on BYT.  So
- * neither needed on gmin platforms or supported upstream.
- */
-const struct camera_af_platform_data *camera_get_af_platform_data(void)
-{
-	static struct camera_af_platform_data afpd = {
-		.power_ctrl = af_power_ctrl,
-	};
-	return &afpd;
-}
-EXPORT_SYMBOL_GPL(camera_get_af_platform_data);
-
 int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
 				struct camera_sensor_platform_data *plat_data,
 				enum intel_v4l2_subdev_type type)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 2/13 staging: atomisp: Remove AP1302 sensor support

In reply to Andy Shevchenko

This sensor is not used by any known ACPI-enabled platform (and no kernel users for it so far).

Just remove it for good until we get a platform which actually uses it.

---
 drivers/staging/media/atomisp/i2c/Kconfig  |   12 -
 drivers/staging/media/atomisp/i2c/Makefile |    2 -
 drivers/staging/media/atomisp/i2c/ap1302.c | 1255 ----------------------------
 drivers/staging/media/atomisp/i2c/ap1302.h |  198 -----
 4 files changed, 1467 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/i2c/ap1302.c
 delete mode 100644 drivers/staging/media/atomisp/i2c/ap1302.h
drivers/staging/media/atomisp/i2c/Kconfig +0 -12
index b607c9837e2f..4da028d919c5 100644
@@ -58,18 +58,6 @@ config VIDEO_MT9M114
 
 	 It currently only works with the atomisp driver.
 
-config VIDEO_AP1302
-       tristate "AP1302 external ISP support"
-       depends on I2C && VIDEO_V4L2
-       select REGMAP_I2C
-       ---help---
-	 This is a Video4Linux2 sensor-level driver for the external
-	 ISP AP1302.
-
-	 AP1302 is an exteral ISP.
-
-	 It currently only works with the atomisp driver.
-
 config VIDEO_GC0310
 	tristate "GC0310 sensor support"
 	depends on I2C && VIDEO_V4L2
drivers/staging/media/atomisp/i2c/Makefile +0 -2
index 8a5a37467c3e..09331f661791 100644
@@ -11,8 +11,6 @@ obj-$(CONFIG_VIDEO_GC0310)     += gc0310.o
 
 obj-$(CONFIG_VIDEO_MSRLIST_HELPER) += libmsrlisthelper.o
 
-obj-$(CONFIG_VIDEO_AP1302)     += ap1302.o
-
 # Makefile for flash drivers
 #
 
drivers/staging/media/atomisp/i2c/ap1302.c deleted +0 -1255

1,255 lines not on this page · raw message

drivers/staging/media/atomisp/i2c/ap1302.h deleted +0 -198

198 lines not on this page · raw message

Signature · 1 line
2.14.1
#2 lore raw

PATCH 3/13 staging: atomisp: Use module_i2c_driver() macro

In reply to Andy 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>

---
 drivers/staging/media/atomisp/i2c/gc0310.c        | 15 +--------------
 drivers/staging/media/atomisp/i2c/gc2235.c        | 15 +--------------
 drivers/staging/media/atomisp/i2c/lm3554.c        | 13 +------------
 drivers/staging/media/atomisp/i2c/mt9m114.c       | 14 +-------------
 drivers/staging/media/atomisp/i2c/ov2680.c        | 16 +---------------
 drivers/staging/media/atomisp/i2c/ov2722.c        | 15 +--------------
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 15 +--------------
 drivers/staging/media/atomisp/i2c/ov8858.c        | 14 +-------------
 8 files changed, 8 insertions(+), 109 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +1 -14
index 35ed51ffe944..730fa5dd80f5 100644
@@ -1470,20 +1470,7 @@ static struct i2c_driver gc0310_driver = {
 	.remove = gc0310_remove,
 	.id_table = gc0310_id,
 };
-
-static int init_gc0310(void)
-{
-	return i2c_add_driver(&gc0310_driver);
-}
-
-static void exit_gc0310(void)
-{
-
-	i2c_del_driver(&gc0310_driver);
-}
-
-module_init(init_gc0310);
-module_exit(exit_gc0310);
+module_i2c_driver(gc0310_driver);
 
 MODULE_AUTHOR("Lai, Angie <[email protected]>");
 MODULE_DESCRIPTION("A low-level driver for GalaxyCore GC0310 sensors");
drivers/staging/media/atomisp/i2c/gc2235.c +1 -14
index e43d31ea9676..6d4a432b6bae 100644
@@ -1199,20 +1199,7 @@ static struct i2c_driver gc2235_driver = {
 	.remove = gc2235_remove,
 	.id_table = gc2235_id,
 };
-
-static int init_gc2235(void)
-{
-	return i2c_add_driver(&gc2235_driver);
-}
-
-static void exit_gc2235(void)
-{
-
-	i2c_del_driver(&gc2235_driver);
-}
-
-module_init(init_gc2235);
-module_exit(exit_gc2235);
+module_i2c_driver(gc2235_driver);
 
 MODULE_AUTHOR("Shuguang Gong <[email protected]>");
 MODULE_DESCRIPTION("A low-level driver for GC2235 sensors");
drivers/staging/media/atomisp/i2c/lm3554.c +1 -12
index 679176f7c542..5424685eb447 100644
@@ -991,19 +991,8 @@ static struct i2c_driver lm3554_driver = {
 	.remove = lm3554_remove,
 	.id_table = lm3554_id,
 };
+module_i2c_driver(lm3554_driver);
 
-static __init int init_lm3554(void)
-{
-	return i2c_add_driver(&lm3554_driver);
-}
-
-static __exit void exit_lm3554(void)
-{
-	i2c_del_driver(&lm3554_driver);
-}
-
-module_init(init_lm3554);
-module_exit(exit_lm3554);
 MODULE_AUTHOR("Jing Tao <[email protected]>");
 MODULE_DESCRIPTION("LED flash driver for LM3554");
 MODULE_LICENSE("GPL");
drivers/staging/media/atomisp/i2c/mt9m114.c +1 -13
index 3c837cb8859c..14fe39f9feb6 100644
@@ -1945,19 +1945,7 @@ static struct i2c_driver mt9m114_driver = {
 	.remove = mt9m114_remove,
 	.id_table = mt9m114_id,
 };
-
-static __init int init_mt9m114(void)
-{
-	return i2c_add_driver(&mt9m114_driver);
-}
-
-static __exit void exit_mt9m114(void)
-{
-	i2c_del_driver(&mt9m114_driver);
-}
-
-module_init(init_mt9m114);
-module_exit(exit_mt9m114);
+module_i2c_driver(mt9m114_driver);
 
 MODULE_AUTHOR("Shuguang Gong <[email protected]>");
 MODULE_LICENSE("GPL");
drivers/staging/media/atomisp/i2c/ov2680.c +1 -15
index 51b7d61df0f5..0dce3c03b2cd 100644
@@ -1527,7 +1527,6 @@ MODULE_DEVICE_TABLE(acpi, ov2680_acpi_match);
 MODULE_DEVICE_TABLE(i2c, ov2680_id);
 static struct i2c_driver ov2680_driver = {
 	.driver = {
-		.owner = THIS_MODULE,
 		.name = OV2680_NAME,
 		.acpi_match_table = ACPI_PTR(ov2680_acpi_match),
 
@@ -1536,20 +1535,7 @@ static struct i2c_driver ov2680_driver = {
 	.remove = ov2680_remove,
 	.id_table = ov2680_id,
 };
-
-static int init_ov2680(void)
-{
-	return i2c_add_driver(&ov2680_driver);
-}
-
-static void exit_ov2680(void)
-{
-
-	i2c_del_driver(&ov2680_driver);
-}
-
-module_init(init_ov2680);
-module_exit(exit_ov2680);
+module_i2c_driver(ov2680_driver);
 
 MODULE_AUTHOR("Jacky Wang <[email protected]>");
 MODULE_DESCRIPTION("A low-level driver for OmniVision 2680 sensors");
drivers/staging/media/atomisp/i2c/ov2722.c +1 -14
index 10094ac56561..c9b1b0cabe87 100644
@@ -1353,20 +1353,7 @@ static struct i2c_driver ov2722_driver = {
 	.remove = ov2722_remove,
 	.id_table = ov2722_id,
 };
-
-static int init_ov2722(void)
-{
-	return i2c_add_driver(&ov2722_driver);
-}
-
-static void exit_ov2722(void)
-{
-
-	i2c_del_driver(&ov2722_driver);
-}
-
-module_init(init_ov2722);
-module_exit(exit_ov2722);
+module_i2c_driver(ov2722_driver);
 
 MODULE_AUTHOR("Wei Liu <[email protected]>");
 MODULE_DESCRIPTION("A low-level driver for OmniVision 2722 sensors");
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +1 -14
index 219501167584..0aafe5c37cc0 100644
@@ -2040,20 +2040,7 @@ static struct i2c_driver ov5693_driver = {
 	.remove = ov5693_remove,
 	.id_table = ov5693_id,
 };
-
-static int init_ov5693(void)
-{
-	return i2c_add_driver(&ov5693_driver);
-}
-
-static void exit_ov5693(void)
-{
-
-	i2c_del_driver(&ov5693_driver);
-}
-
-module_init(init_ov5693);
-module_exit(exit_ov5693);
+module_i2c_driver(ov5693_driver);
 
 MODULE_DESCRIPTION("A low-level driver for OmniVision 5693 sensors");
 MODULE_LICENSE("GPL");
drivers/staging/media/atomisp/i2c/ov8858.c +1 -13
index 43e1638fd674..d0d16b9015d0 100644
@@ -2203,19 +2203,7 @@ static struct i2c_driver ov8858_driver = {
 	.remove = ov8858_remove,
 	.id_table = ov8858_id,
 };
-
-static __init int ov8858_init_mod(void)
-{
-	return i2c_add_driver(&ov8858_driver);
-}
-
-static __exit void ov8858_exit_mod(void)
-{
-	i2c_del_driver(&ov8858_driver);
-}
-
-module_init(ov8858_init_mod);
-module_exit(ov8858_exit_mod);
+module_i2c_driver(ov8858_driver);
 
 MODULE_DESCRIPTION("A low-level driver for Omnivision OV8858 sensors");
 MODULE_LICENSE("GPL");
Signature · 1 line
2.14.1
#7 lore raw

PATCH 8/13 staging: atomisp: Remove ->power_ctrl() callback

In reply to Andy 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.

---
 drivers/staging/media/atomisp/i2c/gc0310.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/gc2235.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/mt9m114.c                    | 4 ----
 drivers/staging/media/atomisp/i2c/ov2680.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov2722.c                     | 4 ----
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c              | 4 ----
 drivers/staging/media/atomisp/i2c/ov8858.c                     | 4 ----
 drivers/staging/media/atomisp/include/linux/atomisp_platform.h | 8 ++++----
 8 files changed, 4 insertions(+), 32 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +0 -4
index 672a28c060f6..b6b1956293c0 100644
@@ -737,10 +737,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	if (flag) {
 		/* The upstream module driver (written to Crystal
 		 * Cove) had this logic to pulse the rails low first.
drivers/staging/media/atomisp/i2c/gc2235.c +0 -4
index 81b23b55f73a..46e063dcdc19 100644
@@ -547,10 +547,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	if (flag) {
 		ret = dev->platform_data->v1p8_ctrl(sd, 1);
 		usleep_range(60, 90);
drivers/staging/media/atomisp/i2c/mt9m114.c +0 -4
index 4968deae2525..950627efa977 100644
@@ -454,10 +454,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	if (flag) {
 		ret = dev->platform_data->v2p8_ctrl(sd, 1);
 		if (ret == 0) {
drivers/staging/media/atomisp/i2c/ov2680.c +0 -4
index 162150055770..9279246cf0b1 100644
@@ -846,10 +846,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	if (flag) {
 		ret |= dev->platform_data->v1p8_ctrl(sd, 1);
 		ret |= dev->platform_data->v2p8_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/ov2722.c +0 -4
index 6c1057542aea..39296a784162 100644
@@ -650,10 +650,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	if (flag) {
 		ret = dev->platform_data->v1p8_ctrl(sd, 1);
 		if (ret == 0) {
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +0 -4
index 8d5b4c3ea55d..33651ec0218f 100644
@@ -1297,10 +1297,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	/* This driver assumes "internal DVDD, PWDNB tied to DOVDD".
 	 * In this set up only gpio0 (XSHUTDN) should be available
 	 * but in some products (for example ECS) gpio1 (PWDNB) is
drivers/staging/media/atomisp/i2c/ov8858.c +0 -4
index c00e5b37139f..a13bbfb44652 100644
@@ -714,10 +714,6 @@ static int __power_ctrl(struct v4l2_subdev *sd, bool flag)
 	if (!dev || !dev->platform_data)
 		return -ENODEV;
 
-	/* Non-gmin platforms use the legacy callback */
-	if (dev->platform_data->power_ctrl)
-		return dev->platform_data->power_ctrl(sd, flag);
-
 	if (dev->platform_data->v1p2_ctrl) {
 		ret = dev->platform_data->v1p2_ctrl(sd, flag);
 		if (ret) {
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +4 -4
index 94ddb46d415b..5ce8678dacf3 100644
@@ -206,7 +206,6 @@ struct camera_vcm_control {
 
 struct camera_sensor_platform_data {
 	int (*flisclk_ctrl)(struct v4l2_subdev *subdev, int flag);
-	int (*power_ctrl)(struct v4l2_subdev *subdev, int flag);
 	int (*csi_cfg)(struct v4l2_subdev *subdev, int flag);
 	bool (*low_fps)(void);
 	int (*platform_init)(struct i2c_client *);
@@ -214,9 +213,10 @@ struct camera_sensor_platform_data {
 	char *(*msr_file_name)(void);
 	struct atomisp_camera_caps *(*get_camera_caps)(void);
 
-	/* New G-Min power and GPIO interface, replaces
-	 * power/gpio_ctrl with methods to control individual
-	 * lines as implemented on all known camera modules. */
+	/*
+	 * New G-Min power and GPIO interface to control individual
+	 * lines as implemented on all known camera modules.
+	 */
 	int (*gpio0_ctrl)(struct v4l2_subdev *subdev, int on);
 	int (*gpio1_ctrl)(struct v4l2_subdev *subdev, int on);
 	int (*v1p8_ctrl)(struct v4l2_subdev *subdev, int on);
Signature · 1 line
2.14.1
#14 lore raw
In reply to Andy Shevchenko

Hi Andy,

Thanks for the patchset.

Quoted 10 lines · Andy Shevchenko

The driver has been submitted with a limitation to few platforms and sensors which it does support. Even though two sensor drivers have no users neither on ACPI-enabled platforms, nor in current Linux kernel code. Patches 1 and 2 removes those drivers for now.

It seems new contributors follow cargo cult programming done by the original driver developers. It's neither good for code, nor for reviewing process. To avoid such issues in the future here are few clean up patches, i.e. patches 3, 4, 6. 13.

Quoted 6 lines

On top of this here are clean ups with regard to GPIO use. One may consider this as an intermediate clean up. This part toughly related to removal of unused sensor drivers in patches 1 and 2.

Patch series has been partially compile tested. It would be nice to see someone with hardware to confirm it doesn't break anything.

Partially compile tested? :-) That sounds really reliable. ;)

Considering the cleanups this set contains, and we need to move forward, reducing the number of extra drivers that are unverifiable anyway, I think the patchset is definitely worth merging.

I've rebased this on the current atomisp branch, and I've pushed the result here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=atomisp-andy>

Let me know if you see issues. The only manually resolved conflict was in the removal of the ap1302 driver.

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]
#15 lore raw
In reply to Andy Shevchenko
Quoted 17 lines · Andy Shevchenko

The driver has been submitted with a limitation to few platforms and sensors which it does support. Even though two sensor drivers have no users neither on ACPI-enabled platforms, nor in current Linux kernel code. Patches 1 and 2 removes those drivers for now.

It seems new contributors follow cargo cult programming done by the original driver developers. It's neither good for code, nor for reviewing process. To avoid such issues in the future here are few clean up patches, i.e. patches 3, 4, 6. 13.

On top of this here are clean ups with regard to GPIO use. One may consider this as an intermediate clean up. This part toughly related to removal of unused sensor drivers in patches 1 and 2.

Patch series has been partially compile tested. It would be nice to see someone with hardware to confirm it doesn't break anything.

Quoted 14 lines

Andy Shevchenko (13):
staging: atomisp: Remove IMX sensor support
staging: atomisp: Remove AP1302 sensor support
staging: atomisp: Use module_i2c_driver() macro
staging: atomisp: Switch i2c drivers to use ->probe_new()
staging: atomisp: Do not set GPIO twice
staging: atomisp: Remove unneeded gpio.h inclusion
staging: atomisp: Remove ->gpio_ctrl() callback
staging: atomisp: Remove ->power_ctrl() callback
staging: atomisp: Remove unused members of camera_sensor_platform_data
staging: atomisp: Remove Gmin dead code #1
staging: atomisp: Remove Gmin dead code #2
staging: atomisp: Remove duplicate declaration in header
staging: atomisp: Remove FSF snail address

After chatting with Andy we figured out the first patch was actually missing from the set, both on the mailing list and Patchwork. I've uploaded it to the same branch, and the patch itself is here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/commit/?h=atomisp-andy&id=5ef68fbdbb80e72f3239363289fbf12f673988a1>

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]
#16 lore raw
Quoted 38 lines · Sakari Ailus
Quoted 21 lines · Andy Shevchenko

The driver has been submitted with a limitation to few platforms and sensors which it does support. Even though two sensor drivers have no
users neither on ACPI-enabled platforms, nor in current Linux kernel code. Patches 1 and 2 removes those drivers for now.

It seems new contributors follow cargo cult programming done by the original driver developers. It's neither good for code, nor for reviewing process. To avoid such issues in the future here are few clean
up patches, i.e. patches 3, 4, 6. 13.

On top of this here are clean ups with regard to GPIO use. One may consider this as an intermediate clean up. This part toughly related to
removal of unused sensor drivers in patches 1 and 2.

Patch series has been partially compile tested. It would be nice to see
someone with hardware to confirm it doesn't break anything.

Quoted 15 lines

Andy Shevchenko (13):
staging: atomisp: Remove IMX sensor support
staging: atomisp: Remove AP1302 sensor support
staging: atomisp: Use module_i2c_driver() macro
staging: atomisp: Switch i2c drivers to use ->probe_new()
staging: atomisp: Do not set GPIO twice
staging: atomisp: Remove unneeded gpio.h inclusion
staging: atomisp: Remove ->gpio_ctrl() callback
staging: atomisp: Remove ->power_ctrl() callback
staging: atomisp: Remove unused members of
camera_sensor_platform_data
staging: atomisp: Remove Gmin dead code #1
staging: atomisp: Remove Gmin dead code #2
staging: atomisp: Remove duplicate declaration in header
staging: atomisp: Remove FSF snail address

Quoted 8 lines

After chatting with Andy we figured out the first patch was actually missing from the set, both on the mailing list and Patchwork. I've uploaded
it to the same branch, and the patch itself is here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/commit/?h=atomisp-a ndy&id=5ef68fbdbb80e72f3239363289fbf12f673988a1>;

Looks good, thanks!

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#17 lore raw
Quoted 44 lines · Andy Shevchenko
Quoted 43 lines · Sakari Ailus
Quoted 21 lines · Andy Shevchenko

The driver has been submitted with a limitation to few platforms and sensors which it does support. Even though two sensor drivers have no
users neither on ACPI-enabled platforms, nor in current Linux kernel code. Patches 1 and 2 removes those drivers for now.

It seems new contributors follow cargo cult programming done by the original driver developers. It's neither good for code, nor for reviewing process. To avoid such issues in the future here are few clean
up patches, i.e. patches 3, 4, 6. 13.

On top of this here are clean ups with regard to GPIO use. One may consider this as an intermediate clean up. This part toughly related to
removal of unused sensor drivers in patches 1 and 2.

Patch series has been partially compile tested. It would be nice to see
someone with hardware to confirm it doesn't break anything.

Quoted 15 lines

Andy Shevchenko (13):
staging: atomisp: Remove IMX sensor support
staging: atomisp: Remove AP1302 sensor support
staging: atomisp: Use module_i2c_driver() macro
staging: atomisp: Switch i2c drivers to use ->probe_new()
staging: atomisp: Do not set GPIO twice
staging: atomisp: Remove unneeded gpio.h inclusion
staging: atomisp: Remove ->gpio_ctrl() callback
staging: atomisp: Remove ->power_ctrl() callback
staging: atomisp: Remove unused members of
camera_sensor_platform_data
staging: atomisp: Remove Gmin dead code #1
staging: atomisp: Remove Gmin dead code #2
staging: atomisp: Remove duplicate declaration in header
staging: atomisp: Remove FSF snail address

After chatting with Andy we figured out the first patch was actually missing from the set, both on the mailing list and Patchwork. I've uploaded
it to the same branch, and the patch itself is here:

Quoted 5 lines
Quoted 3 lines

<URL:https://git.linuxtv.org/sailus/media_tree.git/commit/?h=atomisp-a ndy&id=5ef68fbdbb80e72f3239363289fbf12f673988a1>;

Looks good, thanks!

Thanks, Andy! I'll add these to the next atomisp pull request.

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]
reviewer
#10 lore raw

PATCH 10/13 staging: atomisp: Remove Gmin dead code #1

In reply to Andy Shevchenko

From: Andy Shevchenko <[email protected]>

struct camera_af_platform_data and bound functions are not used anywhere.

---
since v1:

- Remove af_power_ctrl which is now unused.

 .../media/atomisp/include/linux/atomisp_platform.h |  6 ---
 .../platform/intel-mid/atomisp_gmin_platform.c     | 43 ----------------------
 2 files changed, 49 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +0 -6
index a8c1825..2dae493 100644
@@ -221,12 +221,6 @@ struct camera_sensor_platform_data {
 						    char *module_id);
 };
 
-struct camera_af_platform_data {
-	int (*power_ctrl)(struct v4l2_subdev *subdev, int flag);
-};
-
-const struct camera_af_platform_data *camera_get_af_platform_data(void);
-
 struct camera_mipi_info {
 	enum atomisp_camera_port        port;
 	unsigned int                    num_lanes;
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +0 -43

49 lines not on this page · raw message

Signature · 1 line
2.7.4