qcacmn: Use version-specific kernel API
Use version-appropriate kernel API. Change-Id: I353f260e36918c9095c35f5c19cceae55b9583ae
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

父節點
ace59f2d1f
當前提交
6d694b9f56
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -125,7 +125,9 @@ __qal_vbus_get_dev_rstctl(struct qdf_pfm_hndl *pfhndl, const char *state,
|
||||
struct qdf_vbus_rstctl **rstctl)
|
||||
{
|
||||
struct reset_control *rsctl;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
|
||||
rsctl = devm_reset_control_get_optional((struct device *)pfhndl, state);
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
|
||||
rsctl = reset_control_get_optional((struct device *)pfhndl, state);
|
||||
#else
|
||||
rsctl = NULL;
|
||||
|
Reference in New Issue
Block a user