From: Wolfram Sang <wsa+renesas@sang-engineering.com> To: linux-media@vger.kernel.org Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 00/16] media: use new API for creating client devices Date: Mon, 16 Dec 2019 16:51:27 +0100 [thread overview] Message-ID: <20191216155146.8803-1-wsa+renesas@sang-engineering.com> (raw) These media drivers create a new I2C client device with the deprecated i2c_new_device() and check afterwards if the client exists and if a driver is bound to it. This series changes the drivers to use the now suggested i2c_new_client_device() call and a new helper to check if the driver is bound. This helper supports (for now) the old and the new API and is also more readable. The drivers were converted with the following coccinelle script: @@ expression client; statement S; @@ client = - i2c_new_device + i2c_new_client_device (...); ... when != client if ( - \( !client \| client == NULL \) || \( !client->dev.driver \| client->dev.driver == NULL \) + !i2c_client_has_driver(client) ) { S } The helper has been tested on a Renesas Salvator-XS board (R-Car M3-N). The rest was build tested by me and buildbot. This series is based on v5.5-rc2 where the new helper was added. A branch can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c/new_device_with_driver This series is largely the same as the last one sent out in November. It was rebased to v5.5-rc2 and one Rev-tag added. The patch for v4l2-core has been extended to use more new API. This series can be applied as is. I think it should go via the media-tree. Looking forward to comments. Thanks and happy hacking, Wolfram Wolfram Sang (16): media: dvb-core: dvbdev: convert to use i2c_new_client_device() media: dvb-frontends: cxd2820r_core: convert to use i2c_new_client_device() media: dvb-frontends: lgdt330x: convert to use i2c_new_client_device() media: dvb-frontends: m88ds3103: convert to use i2c_new_client_device() media: dvb-frontends: ts2020: convert to use i2c_new_client_device() media: pci: cx23885: cx23885-dvb: convert to use i2c_new_client_device() media: pci: saa7164: saa7164-dvb: convert to use i2c_new_client_device() media: pci: smipcie: smipcie-main: convert to use i2c_new_client_device() media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: af9035: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: anysee: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: rtl28xxu: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: zd1301: convert to use i2c_new_client_device() media: usb: dvb-usb: dib0700_devices: convert to use i2c_new_client_device() media: usb: dvb-usb: dw2102: convert to use i2c_new_client_device() media: v4l2-core: v4l2-i2c: convert to new API with ERRPTR drivers/media/dvb-core/dvbdev.c | 4 +- drivers/media/dvb-frontends/cxd2820r_core.c | 4 +- drivers/media/dvb-frontends/lgdt330x.c | 4 +- drivers/media/dvb-frontends/m88ds3103.c | 4 +- drivers/media/dvb-frontends/ts2020.c | 4 +- drivers/media/pci/cx23885/cx23885-dvb.c | 114 +++++++++--------- drivers/media/pci/saa7164/saa7164-dvb.c | 20 +-- drivers/media/pci/smipcie/smipcie-main.c | 4 +- .../platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 +- drivers/media/usb/dvb-usb-v2/af9035.c | 4 +- drivers/media/usb/dvb-usb-v2/anysee.c | 4 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 36 +++--- drivers/media/usb/dvb-usb-v2/zd1301.c | 4 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 8 +- drivers/media/usb/dvb-usb/dw2102.c | 8 +- drivers/media/v4l2-core/v4l2-i2c.c | 10 +- 16 files changed, 115 insertions(+), 121 deletions(-) -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa+renesas@sang-engineering.com> To: linux-media@vger.kernel.org Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH RESEND 00/16] media: use new API for creating client devices Date: Mon, 16 Dec 2019 16:51:27 +0100 [thread overview] Message-ID: <20191216155146.8803-1-wsa+renesas@sang-engineering.com> (raw) These media drivers create a new I2C client device with the deprecated i2c_new_device() and check afterwards if the client exists and if a driver is bound to it. This series changes the drivers to use the now suggested i2c_new_client_device() call and a new helper to check if the driver is bound. This helper supports (for now) the old and the new API and is also more readable. The drivers were converted with the following coccinelle script: @@ expression client; statement S; @@ client = - i2c_new_device + i2c_new_client_device (...); ... when != client if ( - \( !client \| client == NULL \) || \( !client->dev.driver \| client->dev.driver == NULL \) + !i2c_client_has_driver(client) ) { S } The helper has been tested on a Renesas Salvator-XS board (R-Car M3-N). The rest was build tested by me and buildbot. This series is based on v5.5-rc2 where the new helper was added. A branch can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c/new_device_with_driver This series is largely the same as the last one sent out in November. It was rebased to v5.5-rc2 and one Rev-tag added. The patch for v4l2-core has been extended to use more new API. This series can be applied as is. I think it should go via the media-tree. Looking forward to comments. Thanks and happy hacking, Wolfram Wolfram Sang (16): media: dvb-core: dvbdev: convert to use i2c_new_client_device() media: dvb-frontends: cxd2820r_core: convert to use i2c_new_client_device() media: dvb-frontends: lgdt330x: convert to use i2c_new_client_device() media: dvb-frontends: m88ds3103: convert to use i2c_new_client_device() media: dvb-frontends: ts2020: convert to use i2c_new_client_device() media: pci: cx23885: cx23885-dvb: convert to use i2c_new_client_device() media: pci: saa7164: saa7164-dvb: convert to use i2c_new_client_device() media: pci: smipcie: smipcie-main: convert to use i2c_new_client_device() media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: af9035: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: anysee: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: rtl28xxu: convert to use i2c_new_client_device() media: usb: dvb-usb-v2: zd1301: convert to use i2c_new_client_device() media: usb: dvb-usb: dib0700_devices: convert to use i2c_new_client_device() media: usb: dvb-usb: dw2102: convert to use i2c_new_client_device() media: v4l2-core: v4l2-i2c: convert to new API with ERRPTR drivers/media/dvb-core/dvbdev.c | 4 +- drivers/media/dvb-frontends/cxd2820r_core.c | 4 +- drivers/media/dvb-frontends/lgdt330x.c | 4 +- drivers/media/dvb-frontends/m88ds3103.c | 4 +- drivers/media/dvb-frontends/ts2020.c | 4 +- drivers/media/pci/cx23885/cx23885-dvb.c | 114 +++++++++--------- drivers/media/pci/saa7164/saa7164-dvb.c | 20 +-- drivers/media/pci/smipcie/smipcie-main.c | 4 +- .../platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 +- drivers/media/usb/dvb-usb-v2/af9035.c | 4 +- drivers/media/usb/dvb-usb-v2/anysee.c | 4 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 36 +++--- drivers/media/usb/dvb-usb-v2/zd1301.c | 4 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 8 +- drivers/media/usb/dvb-usb/dw2102.c | 8 +- drivers/media/v4l2-core/v4l2-i2c.c | 10 +- 16 files changed, 115 insertions(+), 121 deletions(-) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-12-16 15:53 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-16 15:51 Wolfram Sang [this message] 2019-12-16 15:51 ` [PATCH RESEND 00/16] media: use new API for creating client devices Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 01/16] media: dvb-core: dvbdev: convert to use i2c_new_client_device() Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 02/16] media: dvb-frontends: cxd2820r_core: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 03/16] media: dvb-frontends: lgdt330x: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 04/16] media: dvb-frontends: m88ds3103: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 05/16] media: dvb-frontends: ts2020: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 06/16] media: pci: cx23885: cx23885-dvb: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 07/16] media: pci: saa7164: saa7164-dvb: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 08/16] media: pci: smipcie: smipcie-main: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 09/16] media: platform: sti: c8sectpfe: c8sectpfe-dvb: " Wolfram Sang 2019-12-16 15:51 ` Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 10/16] media: usb: dvb-usb-v2: af9035: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 11/16] media: usb: dvb-usb-v2: anysee: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 12/16] media: usb: dvb-usb-v2: rtl28xxu: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 13/16] media: usb: dvb-usb-v2: zd1301: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 14/16] media: usb: dvb-usb: dib0700_devices: " Wolfram Sang 2019-12-16 15:51 ` [PATCH RESEND 15/16] media: usb: dvb-usb: dw2102: " Wolfram Sang 2019-12-16 15:51 ` [PATCH V2 16/16] media: v4l2-core: v4l2-i2c: convert to new API with ERRPTR Wolfram Sang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191216155146.8803-1-wsa+renesas@sang-engineering.com \ --to=wsa+renesas@sang-engineering.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.