Lines Matching refs:kcs_bmc
472 static int kcs_bmc_ipmi_add_device(struct kcs_bmc_device *kcs_bmc) in kcs_bmc_ipmi_add_device() argument
477 priv = devm_kzalloc(kcs_bmc->dev, sizeof(*priv), GFP_KERNEL); in kcs_bmc_ipmi_add_device()
486 priv->client.dev = kcs_bmc; in kcs_bmc_ipmi_add_device()
488 priv->data_in = devm_kmalloc(kcs_bmc->dev, KCS_MSG_BUFSIZ, GFP_KERNEL); in kcs_bmc_ipmi_add_device()
489 priv->data_out = devm_kmalloc(kcs_bmc->dev, KCS_MSG_BUFSIZ, GFP_KERNEL); in kcs_bmc_ipmi_add_device()
490 priv->kbuffer = devm_kmalloc(kcs_bmc->dev, KCS_MSG_BUFSIZ, GFP_KERNEL); in kcs_bmc_ipmi_add_device()
493 priv->miscdev.name = devm_kasprintf(kcs_bmc->dev, GFP_KERNEL, "%s%u", DEVICE_NAME, in kcs_bmc_ipmi_add_device()
494 kcs_bmc->channel); in kcs_bmc_ipmi_add_device()
502 dev_err(kcs_bmc->dev, "Unable to register device: %d\n", rc); in kcs_bmc_ipmi_add_device()
510 dev_info(kcs_bmc->dev, "Initialised IPMI client for channel %d", kcs_bmc->channel); in kcs_bmc_ipmi_add_device()
515 static int kcs_bmc_ipmi_remove_device(struct kcs_bmc_device *kcs_bmc) in kcs_bmc_ipmi_remove_device() argument
521 if (pos->client.dev == kcs_bmc) { in kcs_bmc_ipmi_remove_device()
534 devm_kfree(kcs_bmc->dev, priv->kbuffer); in kcs_bmc_ipmi_remove_device()
535 devm_kfree(kcs_bmc->dev, priv->data_out); in kcs_bmc_ipmi_remove_device()
536 devm_kfree(kcs_bmc->dev, priv->data_in); in kcs_bmc_ipmi_remove_device()
537 devm_kfree(kcs_bmc->dev, priv); in kcs_bmc_ipmi_remove_device()