media: adv*/vivid/pulse8/rainshadow: cec: use CEC_CAP_DEFAULTS

Use the new CEC_CAP_DEFAULTS define in the adv, vivid, pulse8 and
rainshadow CEC drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Hans Verkuil 2017-08-04 06:41:52 -04:00 committed by Mauro Carvalho Chehab
parent ee0c503eac
commit 57b7963655
6 changed files with 6 additions and 12 deletions

View File

@ -1927,8 +1927,7 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
#if IS_ENABLED(CONFIG_VIDEO_ADV7511_CEC) #if IS_ENABLED(CONFIG_VIDEO_ADV7511_CEC)
state->cec_adap = cec_allocate_adapter(&adv7511_cec_adap_ops, state->cec_adap = cec_allocate_adapter(&adv7511_cec_adap_ops,
state, dev_name(&client->dev), CEC_CAP_TRANSMIT | state, dev_name(&client->dev), CEC_CAP_DEFAULTS,
CEC_CAP_LOG_ADDRS | CEC_CAP_PASSTHROUGH | CEC_CAP_RC,
ADV7511_MAX_ADDRS); ADV7511_MAX_ADDRS);
err = PTR_ERR_OR_ZERO(state->cec_adap); err = PTR_ERR_OR_ZERO(state->cec_adap);
if (err) { if (err) {

View File

@ -3515,8 +3515,7 @@ static int adv76xx_probe(struct i2c_client *client,
#if IS_ENABLED(CONFIG_VIDEO_ADV7604_CEC) #if IS_ENABLED(CONFIG_VIDEO_ADV7604_CEC)
state->cec_adap = cec_allocate_adapter(&adv76xx_cec_adap_ops, state->cec_adap = cec_allocate_adapter(&adv76xx_cec_adap_ops,
state, dev_name(&client->dev), state, dev_name(&client->dev),
CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS | CEC_CAP_DEFAULTS, ADV76XX_MAX_ADDRS);
CEC_CAP_PASSTHROUGH | CEC_CAP_RC, ADV76XX_MAX_ADDRS);
err = PTR_ERR_OR_ZERO(state->cec_adap); err = PTR_ERR_OR_ZERO(state->cec_adap);
if (err) if (err)
goto err_entity; goto err_entity;

View File

@ -3568,8 +3568,7 @@ static int adv7842_probe(struct i2c_client *client,
#if IS_ENABLED(CONFIG_VIDEO_ADV7842_CEC) #if IS_ENABLED(CONFIG_VIDEO_ADV7842_CEC)
state->cec_adap = cec_allocate_adapter(&adv7842_cec_adap_ops, state->cec_adap = cec_allocate_adapter(&adv7842_cec_adap_ops,
state, dev_name(&client->dev), state, dev_name(&client->dev),
CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS | CEC_CAP_DEFAULTS, ADV7842_MAX_ADDRS);
CEC_CAP_PASSTHROUGH | CEC_CAP_RC, ADV7842_MAX_ADDRS);
err = PTR_ERR_OR_ZERO(state->cec_adap); err = PTR_ERR_OR_ZERO(state->cec_adap);
if (err) if (err)
goto err_entity; goto err_entity;

View File

@ -219,8 +219,7 @@ struct cec_adapter *vivid_cec_alloc_adap(struct vivid_dev *dev,
bool is_source) bool is_source)
{ {
char name[sizeof(dev->vid_out_dev.name) + 2]; char name[sizeof(dev->vid_out_dev.name) + 2];
u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS | u32 caps = CEC_CAP_DEFAULTS | CEC_CAP_MONITOR_ALL;
CEC_CAP_PASSTHROUGH | CEC_CAP_RC | CEC_CAP_MONITOR_ALL;
snprintf(name, sizeof(name), "%s%d", snprintf(name, sizeof(name), "%s%d",
is_source ? dev->vid_out_dev.name : dev->vid_cap_dev.name, is_source ? dev->vid_out_dev.name : dev->vid_cap_dev.name,

View File

@ -642,8 +642,7 @@ static const struct cec_adap_ops pulse8_cec_adap_ops = {
static int pulse8_connect(struct serio *serio, struct serio_driver *drv) static int pulse8_connect(struct serio *serio, struct serio_driver *drv)
{ {
u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS | CEC_CAP_PHYS_ADDR | u32 caps = CEC_CAP_DEFAULTS | CEC_CAP_PHYS_ADDR | CEC_CAP_MONITOR_ALL;
CEC_CAP_PASSTHROUGH | CEC_CAP_RC | CEC_CAP_MONITOR_ALL;
struct pulse8 *pulse8; struct pulse8 *pulse8;
int err = -ENOMEM; int err = -ENOMEM;
struct cec_log_addrs log_addrs = {}; struct cec_log_addrs log_addrs = {};

View File

@ -309,8 +309,7 @@ static const struct cec_adap_ops rain_cec_adap_ops = {
static int rain_connect(struct serio *serio, struct serio_driver *drv) static int rain_connect(struct serio *serio, struct serio_driver *drv)
{ {
u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS | CEC_CAP_PHYS_ADDR | u32 caps = CEC_CAP_DEFAULTS | CEC_CAP_PHYS_ADDR | CEC_CAP_MONITOR_ALL;
CEC_CAP_PASSTHROUGH | CEC_CAP_RC | CEC_CAP_MONITOR_ALL;
struct rain *rain; struct rain *rain;
int err = -ENOMEM; int err = -ENOMEM;
struct cec_log_addrs log_addrs = {}; struct cec_log_addrs log_addrs = {};