android_kernel_xiaomi_sm8350/drivers/soc/qcom/plh_scmi.c
Santosh Mardi 052e50047a drivers: soc: qcom: scmi_clients: add zero initialized entry in id table
SCMI core framework match id function expects zero initialized entry at
the end of id_match table. Add zero initialized entries in both memlat
and plh scmi client drivers.

Change-Id: I268ffc48fa07a42a052ea45c160f1e2ab21994ff
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2021-05-26 18:26:09 -07:00

42 lines
928 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020 - 2021, The Linux Foundation. All rights reserved.
*/
#include <linux/scmi_protocol.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/platform_device.h>
extern void rimps_plh_init(struct scmi_handle *handle);
static int scmi_plh_probe(struct scmi_device *sdev)
{
struct scmi_handle *handle = sdev->handle;
if (!handle || !handle->plh_ops)
return -ENODEV;
rimps_plh_init(handle);
return 0;
}
static const struct scmi_device_id scmi_id_table[] = {
{ SCMI_PROTOCOL_PLH },
{ },
};
MODULE_DEVICE_TABLE(scmi, scmi_id_table);
static struct scmi_driver scmi_plh_drv = {
.name = "scmi-plh-driver",
.probe = scmi_plh_probe,
.id_table = scmi_id_table,
};
module_scmi_driver(scmi_plh_drv);
MODULE_DESCRIPTION("ARM SCMI PLH driver");
MODULE_LICENSE("GPL v2");