Commit 518f4b26 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: rc-core: rename input_name to device_name

When an ir-spi is registered, you get this message.

rc rc0: Unspecified device as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0

"Unspecified device" refers to input_name, which makes no sense for IR
TX only devices. So, rename to device_name.

Also make driver_name const char* so that no casts are needed anywhere.

Now ir-spi reports:

rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent db68102c
...@@ -116,7 +116,7 @@ int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report) ...@@ -116,7 +116,7 @@ int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report)
rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER;
rdev->open = picolcd_cir_open; rdev->open = picolcd_cir_open;
rdev->close = picolcd_cir_close; rdev->close = picolcd_cir_close;
rdev->input_name = data->hdev->name; rdev->device_name = data->hdev->name;
rdev->input_phys = data->hdev->phys; rdev->input_phys = data->hdev->phys;
rdev->input_id.bustype = data->hdev->bus; rdev->input_id.bustype = data->hdev->bus;
rdev->input_id.vendor = data->hdev->vendor; rdev->input_id.vendor = data->hdev->vendor;
......
...@@ -263,12 +263,12 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, ...@@ -263,12 +263,12 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
snprintf(adap->input_name, sizeof(adap->input_name), snprintf(adap->device_name, sizeof(adap->device_name),
"RC for %s", name); "RC for %s", name);
snprintf(adap->input_phys, sizeof(adap->input_phys), snprintf(adap->input_phys, sizeof(adap->input_phys),
"%s/input0", name); "%s/input0", name);
adap->rc->input_name = adap->input_name; adap->rc->device_name = adap->device_name;
adap->rc->input_phys = adap->input_phys; adap->rc->input_phys = adap->input_phys;
adap->rc->input_id.bustype = BUS_CEC; adap->rc->input_id.bustype = BUS_CEC;
adap->rc->input_id.vendor = 0; adap->rc->input_id.vendor = 0;
......
...@@ -73,7 +73,7 @@ int sms_ir_init(struct smscore_device_t *coredev) ...@@ -73,7 +73,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
strlcpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys)); strlcpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys));
strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys)); strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys));
dev->input_name = coredev->ir.name; dev->device_name = coredev->ir.name;
dev->input_phys = coredev->ir.phys; dev->input_phys = coredev->ir.phys;
dev->dev.parent = coredev->device; dev->dev.parent = coredev->device;
...@@ -91,7 +91,7 @@ int sms_ir_init(struct smscore_device_t *coredev) ...@@ -91,7 +91,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
dev->driver_name = MODULE_NAME; dev->driver_name = MODULE_NAME;
pr_debug("Input device (IR) %s is set for key events\n", pr_debug("Input device (IR) %s is set for key events\n",
dev->input_name); dev->device_name);
err = rc_register_device(dev); err = rc_register_device(dev);
if (err < 0) { if (err < 0) {
......
...@@ -452,7 +452,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -452,7 +452,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
*/ */
rc->input_id.bustype = BUS_I2C; rc->input_id.bustype = BUS_I2C;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
rc->input_name = ir->name; rc->device_name = ir->name;
/* /*
* Initialize the other fields of rc_dev * Initialize the other fields of rc_dev
......
...@@ -535,7 +535,7 @@ int bttv_input_init(struct bttv *btv) ...@@ -535,7 +535,7 @@ int bttv_input_init(struct bttv *btv)
snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0",
pci_name(btv->c.pci)); pci_name(btv->c.pci));
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
rc->input_id.bustype = BUS_PCI; rc->input_id.bustype = BUS_PCI;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -351,7 +351,7 @@ int cx23885_input_init(struct cx23885_dev *dev) ...@@ -351,7 +351,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
} }
kernel_ir->rc = rc; kernel_ir->rc = rc;
rc->input_name = kernel_ir->name; rc->device_name = kernel_ir->name;
rc->input_phys = kernel_ir->phys; rc->input_phys = kernel_ir->phys;
rc->input_id.bustype = BUS_PCI; rc->input_id.bustype = BUS_PCI;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -464,7 +464,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ...@@ -464,7 +464,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)", core->board.name); snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)", core->board.name);
snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci)); snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci));
dev->input_name = ir->name; dev->device_name = ir->name;
dev->input_phys = ir->phys; dev->input_phys = ir->phys;
dev->input_id.bustype = BUS_PCI; dev->input_id.bustype = BUS_PCI;
dev->input_id.version = 1; dev->input_id.version = 1;
......
...@@ -748,7 +748,7 @@ static int dm1105_ir_init(struct dm1105_dev *dm1105) ...@@ -748,7 +748,7 @@ static int dm1105_ir_init(struct dm1105_dev *dm1105)
dev->driver_name = MODULE_NAME; dev->driver_name = MODULE_NAME;
dev->map_name = RC_MAP_DM1105_NEC; dev->map_name = RC_MAP_DM1105_NEC;
dev->input_name = "DVB on-card IR receiver"; dev->device_name = "DVB on-card IR receiver";
dev->input_phys = dm1105->ir.input_phys; dev->input_phys = dm1105->ir.input_phys;
dev->input_id.bustype = BUS_PCI; dev->input_id.bustype = BUS_PCI;
dev->input_id.version = 1; dev->input_id.version = 1;
......
...@@ -176,7 +176,7 @@ struct mantis_pci { ...@@ -176,7 +176,7 @@ struct mantis_pci {
struct work_struct uart_work; struct work_struct uart_work;
struct rc_dev *rc; struct rc_dev *rc;
char input_name[80]; char device_name[80];
char input_phys[80]; char input_phys[80];
char *rc_map_name; char *rc_map_name;
}; };
......
...@@ -46,12 +46,12 @@ int mantis_input_init(struct mantis_pci *mantis) ...@@ -46,12 +46,12 @@ int mantis_input_init(struct mantis_pci *mantis)
goto out; goto out;
} }
snprintf(mantis->input_name, sizeof(mantis->input_name), snprintf(mantis->device_name, sizeof(mantis->device_name),
"Mantis %s IR receiver", mantis->hwconfig->model_name); "Mantis %s IR receiver", mantis->hwconfig->model_name);
snprintf(mantis->input_phys, sizeof(mantis->input_phys), snprintf(mantis->input_phys, sizeof(mantis->input_phys),
"pci-%s/ir0", pci_name(mantis->pdev)); "pci-%s/ir0", pci_name(mantis->pdev));
dev->input_name = mantis->input_name; dev->device_name = mantis->device_name;
dev->input_phys = mantis->input_phys; dev->input_phys = mantis->input_phys;
dev->input_id.bustype = BUS_PCI; dev->input_id.bustype = BUS_PCI;
dev->input_id.vendor = mantis->vendor_id; dev->input_id.vendor = mantis->vendor_id;
......
...@@ -870,7 +870,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) ...@@ -870,7 +870,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
if (raw_decode) if (raw_decode)
rc->driver_type = RC_DRIVER_IR_RAW; rc->driver_type = RC_DRIVER_IR_RAW;
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
rc->input_id.bustype = BUS_PCI; rc->input_id.bustype = BUS_PCI;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -188,14 +188,14 @@ int smi_ir_init(struct smi_dev *dev) ...@@ -188,14 +188,14 @@ int smi_ir_init(struct smi_dev *dev)
return -ENOMEM; return -ENOMEM;
/* init input device */ /* init input device */
snprintf(ir->input_name, sizeof(ir->input_name), "IR (%s)", snprintf(ir->device_name, sizeof(ir->device_name), "IR (%s)",
dev->info->name); dev->info->name);
snprintf(ir->input_phys, sizeof(ir->input_phys), "pci-%s/ir0", snprintf(ir->input_phys, sizeof(ir->input_phys), "pci-%s/ir0",
pci_name(dev->pci_dev)); pci_name(dev->pci_dev));
rc_dev->driver_name = "SMI_PCIe"; rc_dev->driver_name = "SMI_PCIe";
rc_dev->input_phys = ir->input_phys; rc_dev->input_phys = ir->input_phys;
rc_dev->input_name = ir->input_name; rc_dev->device_name = ir->device_name;
rc_dev->input_id.bustype = BUS_PCI; rc_dev->input_id.bustype = BUS_PCI;
rc_dev->input_id.version = 1; rc_dev->input_id.version = 1;
rc_dev->input_id.vendor = dev->pci_dev->subsystem_vendor; rc_dev->input_id.vendor = dev->pci_dev->subsystem_vendor;
......
...@@ -240,7 +240,7 @@ struct smi_rc { ...@@ -240,7 +240,7 @@ struct smi_rc {
struct smi_dev *dev; struct smi_dev *dev;
struct rc_dev *rc_dev; struct rc_dev *rc_dev;
char input_phys[64]; char input_phys[64];
char input_name[64]; char device_name[64];
struct work_struct work; struct work_struct work;
u8 irData[256]; u8 irData[256];
......
...@@ -186,7 +186,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) ...@@ -186,7 +186,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
"pci-%s/ir0", pci_name(saa->pci)); "pci-%s/ir0", pci_name(saa->pci));
dev->driver_name = MODULE_NAME; dev->driver_name = MODULE_NAME;
dev->input_name = budget_ci->ir.name; dev->device_name = budget_ci->ir.name;
dev->input_phys = budget_ci->ir.phys; dev->input_phys = budget_ci->ir.phys;
dev->input_id.bustype = BUS_PCI; dev->input_id.bustype = BUS_PCI;
dev->input_id.version = 1; dev->input_id.version = 1;
......
...@@ -766,7 +766,7 @@ static void ati_remote_rc_init(struct ati_remote *ati_remote) ...@@ -766,7 +766,7 @@ static void ati_remote_rc_init(struct ati_remote *ati_remote)
rdev->open = ati_remote_rc_open; rdev->open = ati_remote_rc_open;
rdev->close = ati_remote_rc_close; rdev->close = ati_remote_rc_close;
rdev->input_name = ati_remote->rc_name; rdev->device_name = ati_remote->rc_name;
rdev->input_phys = ati_remote->rc_phys; rdev->input_phys = ati_remote->rc_phys;
usb_to_input_id(ati_remote->udev, &rdev->input_id); usb_to_input_id(ati_remote->udev, &rdev->input_id);
......
...@@ -1060,7 +1060,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) ...@@ -1060,7 +1060,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
rdev->s_idle = ene_set_idle; rdev->s_idle = ene_set_idle;
rdev->driver_name = ENE_DRIVER_NAME; rdev->driver_name = ENE_DRIVER_NAME;
rdev->map_name = RC_MAP_RC6_MCE; rdev->map_name = RC_MAP_RC6_MCE;
rdev->input_name = "ENE eHome Infrared Remote Receiver"; rdev->device_name = "ENE eHome Infrared Remote Receiver";
if (dev->hw_learning_and_tx_capable) { if (dev->hw_learning_and_tx_capable) {
rdev->s_learning_mode = ene_set_learning_mode; rdev->s_learning_mode = ene_set_learning_mode;
...@@ -1070,7 +1070,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) ...@@ -1070,7 +1070,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
rdev->s_tx_carrier = ene_set_tx_carrier; rdev->s_tx_carrier = ene_set_tx_carrier;
rdev->s_tx_duty_cycle = ene_set_tx_duty_cycle; rdev->s_tx_duty_cycle = ene_set_tx_duty_cycle;
rdev->s_carrier_report = ene_set_carrier_report; rdev->s_carrier_report = ene_set_carrier_report;
rdev->input_name = "ENE eHome Infrared Remote Transceiver"; rdev->device_name = "ENE eHome Infrared Remote Transceiver";
} }
dev->rdev = rdev; dev->rdev = rdev;
......
...@@ -532,7 +532,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id ...@@ -532,7 +532,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER;
rdev->open = fintek_open; rdev->open = fintek_open;
rdev->close = fintek_close; rdev->close = fintek_close;
rdev->input_name = FINTEK_DESCRIPTION; rdev->device_name = FINTEK_DESCRIPTION;
rdev->input_phys = "fintek/cir0"; rdev->input_phys = "fintek/cir0";
rdev->input_id.bustype = BUS_HOST; rdev->input_id.bustype = BUS_HOST;
rdev->input_id.vendor = VENDOR_ID_FINTEK; rdev->input_id.vendor = VENDOR_ID_FINTEK;
......
...@@ -150,7 +150,7 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) ...@@ -150,7 +150,7 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
} }
rcdev->priv = gpio_dev; rcdev->priv = gpio_dev;
rcdev->input_name = GPIO_IR_DEVICE_NAME; rcdev->device_name = GPIO_IR_DEVICE_NAME;
rcdev->input_phys = GPIO_IR_DEVICE_NAME "/input0"; rcdev->input_phys = GPIO_IR_DEVICE_NAME "/input0";
rcdev->input_id.bustype = BUS_HOST; rcdev->input_id.bustype = BUS_HOST;
rcdev->input_id.vendor = 0x0001; rcdev->input_id.vendor = 0x0001;
......
...@@ -194,7 +194,7 @@ static int igorplugusb_probe(struct usb_interface *intf, ...@@ -194,7 +194,7 @@ static int igorplugusb_probe(struct usb_interface *intf,
if (!rc) if (!rc)
goto fail; goto fail;
rc->input_name = DRIVER_DESC; rc->device_name = DRIVER_DESC;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
usb_to_input_id(udev, &rc->input_id); usb_to_input_id(udev, &rc->input_id);
rc->dev.parent = &intf->dev; rc->dev.parent = &intf->dev;
......
...@@ -487,7 +487,7 @@ static int iguanair_probe(struct usb_interface *intf, ...@@ -487,7 +487,7 @@ static int iguanair_probe(struct usb_interface *intf,
usb_make_path(ir->udev, ir->phys, sizeof(ir->phys)); usb_make_path(ir->udev, ir->phys, sizeof(ir->phys));
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
usb_to_input_id(ir->udev, &rc->input_id); usb_to_input_id(ir->udev, &rc->input_id);
rc->dev.parent = &intf->dev; rc->dev.parent = &intf->dev;
......
...@@ -1083,7 +1083,7 @@ int img_ir_probe_hw(struct img_ir_priv *priv) ...@@ -1083,7 +1083,7 @@ int img_ir_probe_hw(struct img_ir_priv *priv)
rdev->priv = priv; rdev->priv = priv;
rdev->map_name = RC_MAP_EMPTY; rdev->map_name = RC_MAP_EMPTY;
rdev->allowed_protocols = img_ir_allowed_protos(priv); rdev->allowed_protocols = img_ir_allowed_protos(priv);
rdev->input_name = "IMG Infrared Decoder"; rdev->device_name = "IMG Infrared Decoder";
rdev->s_filter = img_ir_set_normal_filter; rdev->s_filter = img_ir_set_normal_filter;
rdev->s_wakeup_filter = img_ir_set_wakeup_filter; rdev->s_wakeup_filter = img_ir_set_wakeup_filter;
......
...@@ -117,7 +117,7 @@ int img_ir_probe_raw(struct img_ir_priv *priv) ...@@ -117,7 +117,7 @@ int img_ir_probe_raw(struct img_ir_priv *priv)
} }
rdev->priv = priv; rdev->priv = priv;
rdev->map_name = RC_MAP_EMPTY; rdev->map_name = RC_MAP_EMPTY;
rdev->input_name = "IMG Infrared Decoder Raw"; rdev->device_name = "IMG Infrared Decoder Raw";
/* Register raw decoder */ /* Register raw decoder */
error = rc_register_device(rdev); error = rc_register_device(rdev);
......
...@@ -2063,7 +2063,7 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx) ...@@ -2063,7 +2063,7 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx)
sizeof(ictx->phys_rdev)); sizeof(ictx->phys_rdev));
strlcat(ictx->phys_rdev, "/input0", sizeof(ictx->phys_rdev)); strlcat(ictx->phys_rdev, "/input0", sizeof(ictx->phys_rdev));
rdev->input_name = ictx->name_rdev; rdev->device_name = ictx->name_rdev;
rdev->input_phys = ictx->phys_rdev; rdev->input_phys = ictx->phys_rdev;
usb_to_input_id(ictx->usbdev_intf0, &rdev->input_id); usb_to_input_id(ictx->usbdev_intf0, &rdev->input_id);
rdev->dev.parent = ictx->dev; rdev->dev.parent = ictx->dev;
......
...@@ -249,7 +249,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev) ...@@ -249,7 +249,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
rdev->driver_name = IR_HIX5HD2_NAME; rdev->driver_name = IR_HIX5HD2_NAME;
map_name = of_get_property(node, "linux,rc-map-name", NULL); map_name = of_get_property(node, "linux,rc-map-name", NULL);
rdev->map_name = map_name ?: RC_MAP_EMPTY; rdev->map_name = map_name ?: RC_MAP_EMPTY;
rdev->input_name = IR_HIX5HD2_NAME; rdev->device_name = IR_HIX5HD2_NAME;
rdev->input_phys = IR_HIX5HD2_NAME "/input0"; rdev->input_phys = IR_HIX5HD2_NAME "/input0";
rdev->input_id.bustype = BUS_HOST; rdev->input_id.bustype = BUS_HOST;
rdev->input_id.vendor = 0x0001; rdev->input_id.vendor = 0x0001;
......
...@@ -155,6 +155,7 @@ static int ir_spi_probe(struct spi_device *spi) ...@@ -155,6 +155,7 @@ static int ir_spi_probe(struct spi_device *spi)
idata->rc->tx_ir = ir_spi_tx; idata->rc->tx_ir = ir_spi_tx;
idata->rc->s_tx_carrier = ir_spi_set_tx_carrier; idata->rc->s_tx_carrier = ir_spi_set_tx_carrier;
idata->rc->s_tx_duty_cycle = ir_spi_set_duty_cycle; idata->rc->s_tx_duty_cycle = ir_spi_set_duty_cycle;
idata->rc->device_name = "IR SPI";
idata->rc->driver_name = IR_SPI_DRIVER_NAME; idata->rc->driver_name = IR_SPI_DRIVER_NAME;
idata->rc->priv = idata; idata->rc->priv = idata;
idata->spi = spi; idata->spi = spi;
......
...@@ -1576,7 +1576,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id ...@@ -1576,7 +1576,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
rdev->s_tx_duty_cycle = ite_set_tx_duty_cycle; rdev->s_tx_duty_cycle = ite_set_tx_duty_cycle;
} }
rdev->input_name = dev_desc->model; rdev->device_name = dev_desc->model;
rdev->input_id.bustype = BUS_HOST; rdev->input_id.bustype = BUS_HOST;
rdev->input_id.vendor = PCI_VENDOR_ID_ITE; rdev->input_id.vendor = PCI_VENDOR_ID_ITE;
rdev->input_id.product = 0; rdev->input_id.product = 0;
......
...@@ -1264,7 +1264,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) ...@@ -1264,7 +1264,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir)
usb_make_path(ir->usbdev, ir->phys, sizeof(ir->phys)); usb_make_path(ir->usbdev, ir->phys, sizeof(ir->phys));
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
usb_to_input_id(ir->usbdev, &rc->input_id); usb_to_input_id(ir->usbdev, &rc->input_id);
rc->dev.parent = dev; rc->dev.parent = dev;
......
...@@ -138,7 +138,7 @@ static int meson_ir_probe(struct platform_device *pdev) ...@@ -138,7 +138,7 @@ static int meson_ir_probe(struct platform_device *pdev)
} }
ir->rc->priv = ir; ir->rc->priv = ir;
ir->rc->input_name = DRIVER_NAME; ir->rc->device_name = DRIVER_NAME;
ir->rc->input_phys = DRIVER_NAME "/input0"; ir->rc->input_phys = DRIVER_NAME "/input0";
ir->rc->input_id.bustype = BUS_HOST; ir->rc->input_id.bustype = BUS_HOST;
map_name = of_get_property(node, "linux,rc-map-name", NULL); map_name = of_get_property(node, "linux,rc-map-name", NULL);
......
...@@ -343,7 +343,7 @@ static int mtk_ir_probe(struct platform_device *pdev) ...@@ -343,7 +343,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
} }
ir->rc->priv = ir; ir->rc->priv = ir;
ir->rc->input_name = MTK_IR_DEV; ir->rc->device_name = MTK_IR_DEV;
ir->rc->input_phys = MTK_IR_DEV "/input0"; ir->rc->input_phys = MTK_IR_DEV "/input0";
ir->rc->input_id.bustype = BUS_HOST; ir->rc->input_id.bustype = BUS_HOST;
ir->rc->input_id.vendor = 0x0001; ir->rc->input_id.vendor = 0x0001;
......
...@@ -1134,7 +1134,7 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) ...@@ -1134,7 +1134,7 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
rdev->tx_ir = nvt_tx_ir; rdev->tx_ir = nvt_tx_ir;
rdev->s_tx_carrier = nvt_set_tx_carrier; rdev->s_tx_carrier = nvt_set_tx_carrier;
rdev->s_wakeup_filter = nvt_ir_raw_set_wakeup_filter; rdev->s_wakeup_filter = nvt_ir_raw_set_wakeup_filter;
rdev->input_name = "Nuvoton w836x7hg Infrared Remote Transceiver"; rdev->device_name = "Nuvoton w836x7hg Infrared Remote Transceiver";
rdev->input_phys = "nuvoton/cir0"; rdev->input_phys = "nuvoton/cir0";
rdev->input_id.bustype = BUS_HOST; rdev->input_id.bustype = BUS_HOST;
rdev->input_id.vendor = PCI_VENDOR_ID_WINBOND2; rdev->input_id.vendor = PCI_VENDOR_ID_WINBOND2;
......
...@@ -219,7 +219,7 @@ static int __init loop_init(void) ...@@ -219,7 +219,7 @@ static int __init loop_init(void)
return -ENOMEM; return -ENOMEM;
} }
rc->input_name = "rc-core loopback device"; rc->device_name = "rc-core loopback device";
rc->input_phys = "rc-core/virtual"; rc->input_phys = "rc-core/virtual";
rc->input_id.bustype = BUS_VIRTUAL; rc->input_id.bustype = BUS_VIRTUAL;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -530,7 +530,7 @@ u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode) ...@@ -530,7 +530,7 @@ u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode)
if (keycode != KEY_RESERVED) if (keycode != KEY_RESERVED)
IR_dprintk(1, "%s: scancode 0x%04x keycode 0x%02x\n", IR_dprintk(1, "%s: scancode 0x%04x keycode 0x%02x\n",
dev->input_name, scancode, keycode); dev->device_name, scancode, keycode);
return keycode; return keycode;
} }
...@@ -663,7 +663,7 @@ static void ir_do_keydown(struct rc_dev *dev, enum rc_type protocol, ...@@ -663,7 +663,7 @@ static void ir_do_keydown(struct rc_dev *dev, enum rc_type protocol,
dev->last_keycode = keycode; dev->last_keycode = keycode;
IR_dprintk(1, "%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n", IR_dprintk(1, "%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n",
dev->input_name, keycode, protocol, scancode); dev->device_name, keycode, protocol, scancode);
input_report_key(dev->input_dev, keycode, 1); input_report_key(dev->input_dev, keycode, 1);
led_trigger_event(led_feedback, LED_FULL); led_trigger_event(led_feedback, LED_FULL);
...@@ -1663,7 +1663,7 @@ static int rc_prepare_rx_device(struct rc_dev *dev) ...@@ -1663,7 +1663,7 @@ static int rc_prepare_rx_device(struct rc_dev *dev)
dev->input_dev->dev.parent = &dev->dev; dev->input_dev->dev.parent = &dev->dev;
memcpy(&dev->input_dev->id, &dev->input_id, sizeof(dev->input_id)); memcpy(&dev->input_dev->id, &dev->input_id, sizeof(dev->input_id));
dev->input_dev->phys = dev->input_phys; dev->input_dev->phys = dev->input_phys;
dev->input_dev->name = dev->input_name; dev->input_dev->name = dev->device_name;
return 0; return 0;
...@@ -1759,7 +1759,7 @@ int rc_register_device(struct rc_dev *dev) ...@@ -1759,7 +1759,7 @@ int rc_register_device(struct rc_dev *dev)
path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
dev_info(&dev->dev, "%s as %s\n", dev_info(&dev->dev, "%s as %s\n",
dev->input_name ?: "Unspecified device", path ?: "N/A"); dev->device_name ?: "Unspecified device", path ?: "N/A");
kfree(path); kfree(path);
if (dev->driver_type != RC_DRIVER_IR_RAW_TX) { if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
......
...@@ -951,7 +951,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) ...@@ -951,7 +951,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3)
usb_make_path(rr3->udev, rr3->phys, sizeof(rr3->phys)); usb_make_path(rr3->udev, rr3->phys, sizeof(rr3->phys));
rc->input_name = rr3->name; rc->device_name = rr3->name;
rc->input_phys = rr3->phys; rc->input_phys = rr3->phys;
usb_to_input_id(rr3->udev, &rc->input_id); usb_to_input_id(rr3->udev, &rc->input_id);
rc->dev.parent = dev; rc->dev.parent = dev;
......
...@@ -513,19 +513,19 @@ static int serial_ir_probe(struct platform_device *dev) ...@@ -513,19 +513,19 @@ static int serial_ir_probe(struct platform_device *dev)
switch (type) { switch (type) {
case IR_HOMEBREW: case IR_HOMEBREW:
rcdev->input_name = "Serial IR type home-brew"; rcdev->device_name = "Serial IR type home-brew";
break; break;
case IR_IRDEO: case IR_IRDEO:
rcdev->input_name = "Serial IR type IRdeo"; rcdev->device_name = "Serial IR type IRdeo";
break; break;
case IR_IRDEO_REMOTE: case IR_IRDEO_REMOTE:
rcdev->input_name = "Serial IR type IRdeo remote"; rcdev->device_name = "Serial IR type IRdeo remote";
break; break;
case IR_ANIMAX: case IR_ANIMAX:
rcdev->input_name = "Serial IR type AnimaX"; rcdev->device_name = "Serial IR type AnimaX";
break; break;
case IR_IGOR: case IR_IGOR:
rcdev->input_name = "Serial IR type IgorPlug"; rcdev->device_name = "Serial IR type IgorPlug";
break; break;
} }
......
...@@ -308,7 +308,7 @@ static int sir_ir_probe(struct platform_device *dev) ...@@ -308,7 +308,7 @@ static int sir_ir_probe(struct platform_device *dev)
if (!rcdev) if (!rcdev)
return -ENOMEM; return -ENOMEM;
rcdev->input_name = "SIR IrDA port"; rcdev->device_name = "SIR IrDA port";
rcdev->input_phys = KBUILD_MODNAME "/input0"; rcdev->input_phys = KBUILD_MODNAME "/input0";
rcdev->input_id.bustype = BUS_HOST; rcdev->input_id.bustype = BUS_HOST;
rcdev->input_id.vendor = 0x0001; rcdev->input_id.vendor = 0x0001;
......
...@@ -299,7 +299,7 @@ static int st_rc_probe(struct platform_device *pdev) ...@@ -299,7 +299,7 @@ static int st_rc_probe(struct platform_device *pdev)
rdev->close = st_rc_close; rdev->close = st_rc_close;
rdev->driver_name = IR_ST_NAME; rdev->driver_name = IR_ST_NAME;
rdev->map_name = RC_MAP_EMPTY; rdev->map_name = RC_MAP_EMPTY;
rdev->input_name = "ST Remote Control Receiver"; rdev->device_name = "ST Remote Control Receiver";
ret = rc_register_device(rdev); ret = rc_register_device(rdev);
if (ret < 0) if (ret < 0)
......
...@@ -299,7 +299,7 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz) ...@@ -299,7 +299,7 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz)
usb_make_path(sz->usbdev, sz->phys, sizeof(sz->phys)); usb_make_path(sz->usbdev, sz->phys, sizeof(sz->phys));
strlcat(sz->phys, "/input0", sizeof(sz->phys)); strlcat(sz->phys, "/input0", sizeof(sz->phys));
rdev->input_name = sz->name; rdev->device_name = sz->name;
rdev->input_phys = sz->phys; rdev->input_phys = sz->phys;
usb_to_input_id(sz->usbdev, &rdev->input_id); usb_to_input_id(sz->usbdev, &rdev->input_id);
rdev->dev.parent = dev; rdev->dev.parent = dev;
......
...@@ -215,7 +215,7 @@ static int sunxi_ir_probe(struct platform_device *pdev) ...@@ -215,7 +215,7 @@ static int sunxi_ir_probe(struct platform_device *pdev)
} }
ir->rc->priv = ir; ir->rc->priv = ir;
ir->rc->input_name = SUNXI_IR_DEV; ir->rc->device_name = SUNXI_IR_DEV;
ir->rc->input_phys = "sunxi-ir/input0"; ir->rc->input_phys = "sunxi-ir/input0";
ir->rc->input_id.bustype = BUS_HOST; ir->rc->input_id.bustype = BUS_HOST;
ir->rc->input_id.vendor = 0x0001; ir->rc->input_id.vendor = 0x0001;
......
...@@ -309,7 +309,7 @@ static int ttusbir_probe(struct usb_interface *intf, ...@@ -309,7 +309,7 @@ static int ttusbir_probe(struct usb_interface *intf,
usb_make_path(tt->udev, tt->phys, sizeof(tt->phys)); usb_make_path(tt->udev, tt->phys, sizeof(tt->phys));
rc->input_name = DRIVER_DESC; rc->device_name = DRIVER_DESC;
rc->input_phys = tt->phys; rc->input_phys = tt->phys;
usb_to_input_id(tt->udev, &rc->input_id); usb_to_input_id(tt->udev, &rc->input_id);
rc->dev.parent = &intf->dev; rc->dev.parent = &intf->dev;
......
...@@ -1068,7 +1068,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) ...@@ -1068,7 +1068,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
} }
data->dev->driver_name = DRVNAME; data->dev->driver_name = DRVNAME;
data->dev->input_name = WBCIR_NAME; data->dev->device_name = WBCIR_NAME;
data->dev->input_phys = "wbcir/cir0"; data->dev->input_phys = "wbcir/cir0";
data->dev->input_id.bustype = BUS_HOST; data->dev->input_id.bustype = BUS_HOST;
data->dev->input_id.vendor = PCI_VENDOR_ID_WINBOND; data->dev->input_id.vendor = PCI_VENDOR_ID_WINBOND;
......
...@@ -335,7 +335,7 @@ int au0828_rc_register(struct au0828_dev *dev) ...@@ -335,7 +335,7 @@ int au0828_rc_register(struct au0828_dev *dev)
usb_make_path(dev->usbdev, ir->phys, sizeof(ir->phys)); usb_make_path(dev->usbdev, ir->phys, sizeof(ir->phys));
strlcat(ir->phys, "/input0", sizeof(ir->phys)); strlcat(ir->phys, "/input0", sizeof(ir->phys));
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
rc->input_id.bustype = BUS_USB; rc->input_id.bustype = BUS_USB;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -154,13 +154,12 @@ static int dvb_usbv2_remote_init(struct dvb_usb_device *d) ...@@ -154,13 +154,12 @@ static int dvb_usbv2_remote_init(struct dvb_usb_device *d)
} }
dev->dev.parent = &d->udev->dev; dev->dev.parent = &d->udev->dev;
dev->input_name = d->name; dev->device_name = d->name;
usb_make_path(d->udev, d->rc_phys, sizeof(d->rc_phys)); usb_make_path(d->udev, d->rc_phys, sizeof(d->rc_phys));
strlcat(d->rc_phys, "/ir0", sizeof(d->rc_phys)); strlcat(d->rc_phys, "/ir0", sizeof(d->rc_phys));
dev->input_phys = d->rc_phys; dev->input_phys = d->rc_phys;
usb_to_input_id(d->udev, &dev->input_id); usb_to_input_id(d->udev, &dev->input_id);
/* TODO: likely RC-core should took const char * */ dev->driver_name = d->props->driver_name;
dev->driver_name = (char *) d->props->driver_name;
dev->map_name = d->rc.map_name; dev->map_name = d->rc.map_name;
dev->allowed_protocols = d->rc.allowed_protos; dev->allowed_protocols = d->rc.allowed_protos;
dev->change_protocol = d->rc.change_protocol; dev->change_protocol = d->rc.change_protocol;
......
...@@ -279,7 +279,7 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d) ...@@ -279,7 +279,7 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d)
dev->change_protocol = d->props.rc.core.change_protocol; dev->change_protocol = d->props.rc.core.change_protocol;
dev->allowed_protocols = d->props.rc.core.allowed_protos; dev->allowed_protocols = d->props.rc.core.allowed_protos;
usb_to_input_id(d->udev, &dev->input_id); usb_to_input_id(d->udev, &dev->input_id);
dev->input_name = "IR-receiver inside an USB DVB receiver"; dev->device_name = "IR-receiver inside an USB DVB receiver";
dev->input_phys = d->rc_phys; dev->input_phys = d->rc_phys;
dev->dev.parent = &d->udev->dev; dev->dev.parent = &d->udev->dev;
dev->priv = d; dev->priv = d;
......
...@@ -807,7 +807,7 @@ static int em28xx_ir_init(struct em28xx *dev) ...@@ -807,7 +807,7 @@ static int em28xx_ir_init(struct em28xx *dev)
usb_make_path(udev, ir->phys, sizeof(ir->phys)); usb_make_path(udev, ir->phys, sizeof(ir->phys));
strlcat(ir->phys, "/input0", sizeof(ir->phys)); strlcat(ir->phys, "/input0", sizeof(ir->phys));
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
rc->input_id.bustype = BUS_USB; rc->input_id.bustype = BUS_USB;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -458,7 +458,7 @@ int tm6000_ir_init(struct tm6000_core *dev) ...@@ -458,7 +458,7 @@ int tm6000_ir_init(struct tm6000_core *dev)
rc_type = RC_BIT_UNKNOWN; rc_type = RC_BIT_UNKNOWN;
tm6000_ir_change_protocol(rc, &rc_type); tm6000_ir_change_protocol(rc, &rc_type);
rc->input_name = ir->name; rc->device_name = ir->name;
rc->input_phys = ir->phys; rc->input_phys = ir->phys;
rc->input_id.bustype = BUS_USB; rc->input_id.bustype = BUS_USB;
rc->input_id.version = 1; rc->input_id.version = 1;
......
...@@ -203,7 +203,7 @@ struct cec_adapter { ...@@ -203,7 +203,7 @@ struct cec_adapter {
u16 phys_addrs[15]; u16 phys_addrs[15];
u32 sequence; u32 sequence;
char input_name[32]; char device_name[32];
char input_phys[32]; char input_phys[32];
char input_drv[32]; char input_drv[32];
}; };
......
...@@ -72,7 +72,7 @@ enum rc_filter_type { ...@@ -72,7 +72,7 @@ enum rc_filter_type {
* @dev: driver model's view of this device * @dev: driver model's view of this device
* @managed_alloc: devm_rc_allocate_device was used to create rc_dev * @managed_alloc: devm_rc_allocate_device was used to create rc_dev
* @sysfs_groups: sysfs attribute groups * @sysfs_groups: sysfs attribute groups
* @input_name: name of the input child device * @device_name: name of the rc child device
* @input_phys: physical path to the input child device * @input_phys: physical path to the input child device
* @input_id: id of the input child device (struct input_id) * @input_id: id of the input child device (struct input_id)
* @driver_name: name of the hardware driver which registered this device * @driver_name: name of the hardware driver which registered this device
...@@ -138,10 +138,10 @@ struct rc_dev { ...@@ -138,10 +138,10 @@ struct rc_dev {
struct device dev; struct device dev;
bool managed_alloc; bool managed_alloc;
const struct attribute_group *sysfs_groups[5]; const struct attribute_group *sysfs_groups[5];
const char *input_name; const char *device_name;
const char *input_phys; const char *input_phys;
struct input_id input_id; struct input_id input_id;
char *driver_name; const char *driver_name;
const char *map_name; const char *map_name;
struct rc_map rc_map; struct rc_map rc_map;
struct mutex lock; struct mutex lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment