Commit 286e78a9 authored by Wolfram Sang's avatar Wolfram Sang Committed by Mauro Carvalho Chehab
Browse files

media: pci: cx88: convert to use i2c_new_client_device()



Move away from the deprecated API and make use of the fact that
unregistering devices is NULL- and ERR_PTR-safe.

Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ba445b7f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1070,7 +1070,6 @@ void cx88_core_put(struct cx88_core *core, struct pci_dev *pci)
	mutex_lock(&devlist);
	cx88_ir_fini(core);
	if (core->i2c_rc == 0) {
		if (core->i2c_rtc)
		i2c_unregister_device(core->i2c_rtc);
		i2c_del_adapter(&core->i2c_adap);
	}
+1 −1
Original line number Diff line number Diff line
@@ -638,7 +638,7 @@ void cx88_i2c_init_ir(struct cx88_core *core)
				   I2C_SMBUS_READ, 0,
				   I2C_SMBUS_QUICK, NULL) >= 0) {
			info.addr = *addrp;
			i2c_new_device(&core->i2c_adap, &info);
			i2c_new_client_device(&core->i2c_adap, &info);
			break;
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -1385,7 +1385,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
		};

		request_module("rtc-isl1208");
		core->i2c_rtc = i2c_new_device(&core->i2c_adap, &rtc_info);
		core->i2c_rtc = i2c_new_client_device(&core->i2c_adap, &rtc_info);
	}
		/* fall-through */
	case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: