Commit 6f8589e5 authored by Mauro Ribeiro's avatar Mauro Ribeiro Committed by Gerrit Code Review

Merge "ODROID-XU3/4: Clean up the compiler warning messages" into odroidxu3-3.10.y

parents 52b56846 40072ad6
......@@ -4,6 +4,8 @@
#include <linux/version.h>
#include <generated/utsrelease.h>
struct device;
#if defined(CONFIG_DEBUG_FS)
struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name,
struct dentry *parent,
......
......@@ -12,6 +12,8 @@
*/
#include <linux/string.h>
struct device;
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
/* backport
* commit 9f3b795a626ee79574595e06d1437fe0c7d51d29
......
......@@ -910,7 +910,7 @@ PHY_RFShadowCompareAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
PHY_RFShadowCompare(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset);
}
......@@ -928,7 +928,7 @@ PHY_RFShadowRecorverAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
PHY_RFShadowRecorver(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset);
}
......@@ -972,7 +972,7 @@ PHY_RFShadowCompareFlagSetAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
// 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!!
if (Offset != 0x26 && Offset != 0x27)
......@@ -994,7 +994,7 @@ PHY_RFShadowRecorverFlagSetAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
// 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!!
if (Offset != 0x26 && Offset != 0x27)
......@@ -1015,7 +1015,7 @@ PHY_RFShadowRefresh(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
RF_Shadow[eRFPath][Offset].Value = 0;
RF_Shadow[eRFPath][Offset].Compare = _FALSE;
......
......@@ -1228,15 +1228,9 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
return 0;
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14,0))
static int cfg80211_rtw_get_station(struct wiphy *wiphy,
struct net_device *ndev,
const u8 *mac, struct station_info *sinfo)
#else
static int cfg80211_rtw_get_station(struct wiphy *wiphy,
struct net_device *ndev,
u8 *mac, struct station_info *sinfo)
#endif
{
int ret = 0;
struct rtw_adapter *padapter = wiphy_to_adapter(wiphy);
......@@ -2963,29 +2957,16 @@ static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14,0))
static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
#else
static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *ndev,
u8 *mac, struct station_parameters *params)
#endif
{
DBG_8192D(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
struct station_del_parameters *params)
#elif (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14, 0))
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac)
#else
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
u8 *mac)
#endif
struct station_del_parameters *params)
{
int ret=0;
struct list_head *phead, *plist;
......@@ -2994,9 +2975,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
struct rtw_adapter *padapter = (struct rtw_adapter *)rtw_netdev_priv(ndev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct sta_priv *pstapriv = &padapter->stapriv;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
const u8 *mac = params->mac;
#endif
DBG_8192D("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
......@@ -3070,13 +3049,8 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
return ret;
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14, 0))
static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
#else
static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *ndev,
u8 *mac, struct station_parameters *params)
#endif
{
DBG_8192D(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
......@@ -3506,18 +3480,8 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len,
return ret;
}
int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan, bool offchan,
unsigned int wait, const u8 *buf, size_t len,
bool no_cck, bool dont_wait_for_ack, u64 *cookie);
static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
struct ieee80211_channel *chan, bool offchan,
unsigned int wait, const u8 *buf, size_t len,
bool no_cck, bool dont_wait_for_ack,
#else
struct cfg80211_mgmt_tx_params *params,
#endif
u64 *cookie)
{
struct rtw_adapter *padapter =
......@@ -3529,11 +3493,9 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
bool ack = true;
u8 category, action;
unsigned long start = jiffies;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
size_t len = params->len;
struct ieee80211_channel *chan = params->chan;
const u8 *buf = params->buf;
#endif
struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *)buf;
u8 tx_ch = (u8) ieee80211_frequency_to_channel(chan->center_freq);
......
......@@ -801,8 +801,8 @@ static ssize_t show_target_loads(
for (i = 0; i < tunables->ntarget_loads; i++)
ret += sprintf(buf + ret, "%u%s", tunables->target_loads[i],
i & 0x1 ? ":" : " ");
ret += sprintf(buf + --ret, "\n");
ret--;
ret += sprintf(buf + ret, "\n");
spin_unlock_irqrestore(&tunables->target_loads_lock, flags);
return ret;
}
......@@ -842,7 +842,8 @@ static ssize_t show_above_hispeed_delay(
tunables->above_hispeed_delay[i],
i & 0x1 ? ":" : " ");
ret += sprintf(buf + --ret, "\n");
ret--;
ret += sprintf(buf + ret, "\n");
spin_unlock_irqrestore(&tunables->above_hispeed_delay_lock, flags);
return ret;
}
......
......@@ -942,7 +942,7 @@ static int exynos5_int_busfreq_target(struct device *dev,
unsigned long freq;
unsigned long old_freq;
unsigned long target_volt;
int i, target_idx = LV_0;
int target_idx = LV_0;
bool set_abb_first_than_volt;
mutex_lock(&data->lock);
......@@ -1117,7 +1117,7 @@ static ssize_t int_show_state(struct device *dev, struct device_attribute *attr,
ssize_t len = 0;
ssize_t write_cnt = (ssize_t)((PAGE_SIZE / LV_END) - 2);
for (i = LV_0; i < LV_END; i++)
for (i = LV_0; i < ARRAY_SIZE(int_bus_opp_list); i++)
len += snprintf(buf + len, write_cnt, "%ld %llu\n", int_bus_opp_list[i].freq,
(unsigned long long)int_bus_opp_list[i].time_in_state);
......@@ -1238,7 +1238,7 @@ static int exynos5_devfreq_int_probe(struct platform_device *pdev)
struct clk *tmp_clk = NULL, *tmp_parent_clk = NULL, *tmp_p_parent_clk = NULL;
struct int_pm_clks *int_clk;
unsigned long volt;
int i, index = -1;
int index = -1;
data = kzalloc(sizeof(struct busfreq_data_int), GFP_KERNEL);
......
......@@ -765,8 +765,10 @@ static int exynos_drm_init(void)
return 0;
#ifdef CONFIG_DRM_EXYNOS_VIDI
err_unregister_pd:
platform_device_unregister(exynos_drm_pdev);
#endif
err_remove_vidi:
#ifdef CONFIG_DRM_EXYNOS_VIDI
......
......@@ -226,7 +226,7 @@ struct hdmiphy_config {
// Default gEnableHPD = true,
//
//-----------------------------------------------------------------------------
unsigned int gEnableHPD = true; // Default setup
unsigned long gEnableHPD = true; // Default setup
static int __init hdmi_hpd_enable(char *line)
{
......@@ -1757,7 +1757,9 @@ static void hdmi_v13_mode_apply(struct hdmi_context *hdata)
}
clk_disable_unprepare(hdata->res.sclk_hdmi);
// clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_hdmiphy);
#ifndef CONFIG_MACH_ODROIDXU3
clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_hdmiphy);
#endif
clk_prepare_enable(hdata->res.sclk_hdmi);
/* enable HDMI and timing generator */
......@@ -1919,7 +1921,9 @@ static void hdmi_v14_mode_apply(struct hdmi_context *hdata)
}
clk_disable_unprepare(hdata->res.sclk_hdmi);
// clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_hdmiphy);
#ifndef CONFIG_MACH_ODROIDXU3
clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_hdmiphy);
#endif
clk_prepare_enable(hdata->res.sclk_hdmi);
/* enable HDMI and timing generator */
......@@ -1940,7 +1944,9 @@ static void hdmiphy_conf_reset(struct hdmi_context *hdata)
u32 reg;
clk_disable_unprepare(hdata->res.sclk_hdmi);
// clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_pixel);
#ifndef CONFIG_ODROIDXU3
clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_pixel);
#endif
clk_prepare_enable(hdata->res.sclk_hdmi);
/* operation mode */
......@@ -1982,6 +1988,7 @@ static void hdmiphy_poweron(struct hdmi_context *hdata)
hdmiphy_conf_reset(hdata);
}
#ifndef CONFIG_MACH_ODROIDXU3
static void hdmiphy_poweroff(struct hdmi_context *hdata)
{
if (hdata->type != HDMI_TYPE14)
......@@ -2003,6 +2010,7 @@ static void hdmiphy_poweroff(struct hdmi_context *hdata)
hdmiphy_reg_writeb(hdata, HDMIPHY_MODE_SET_DONE,
HDMI_PHY_DISABLE_MODE_SET);
}
#endif
static void hdmiphy_conf_apply(struct hdmi_context *hdata)
{
......@@ -2349,12 +2357,16 @@ static void hdmi_poweroff(struct exynos_drm_display *display)
/* HDMI System Disable */
hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_EN);
// hdmiphy_poweroff(hdata);
#ifndef CONFIG_MACH_ODROIDXU3
hdmiphy_poweroff(hdata);
#endif
cancel_delayed_work(&hdata->hotplug_work);
// clk_disable_unprepare(res->sclk_hdmi);
// clk_disable_unprepare(res->hdmi);
#ifndef CONFIG_MACH_ODROIDXU3
clk_disable_unprepare(res->sclk_hdmi);
clk_disable_unprepare(res->hdmi);
#endif
/* reset pmu hdmiphy control bit to disable hdmiphy */
regmap_update_bits(hdata->pmureg, PMU_HDMI_PHY_CONTROL,
......@@ -2473,7 +2485,9 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
goto fail;
}
// clk_set_parent(res->mout_hdmi, res->sclk_pixel);
#ifndef CONFIG_MACH_ODROIDXU3
clk_set_parent(res->mout_hdmi, res->sclk_pixel);
#endif
clk_set_parent(res->sclk_hdmi, res->sclk_hdmiphy);
res->regul_bulk = devm_kzalloc(dev, ARRAY_SIZE(supply) *
......
......@@ -54,6 +54,8 @@ static struct ioboard_spi *ioboard_spi;
#define CMD_HIGH_SPEED_READ 0x0B
#define CMD_READ_STATUS_REG 0x05
#define SPI_READ_HIGHSPEED
// Erase memory
#define CMD_ERASE_4KB 0x20
#define CMD_ERASE_32KB 0x52
......@@ -196,7 +198,7 @@ static int ioboard_spi_byte_write (struct spi_device *spi, unsigned int addr,
return 0;
}
#ifdef SPI_READ_HIGHSPEED
//[*]--------------------------------------------------------------------------------------------------[*]
static int ioboard_spi_read_memory_highspeed (struct spi_device *spi, unsigned int addr, unsigned char *rdata, unsigned int size)
{
......@@ -218,7 +220,7 @@ static int ioboard_spi_read_memory_highspeed (struct spi_device *spi, unsigne
return 0;
}
#else
//[*]--------------------------------------------------------------------------------------------------[*]
static int ioboard_spi_read_memory (struct spi_device *spi, unsigned int addr, unsigned char *rdata, unsigned int size)
{
......@@ -239,6 +241,7 @@ static int ioboard_spi_read_memory (struct spi_device *spi, unsigne
return 0;
}
#endif
//[*]--------------------------------------------------------------------------------------------------[*]
int ioboard_spi_read (struct spi_device *spi, unsigned int addr, unsigned char *rdata, unsigned int size)
......@@ -249,12 +252,20 @@ int ioboard_spi_read (struct spi_device *spi, unsigned int addr, unsigned cha
na = size % SPI_MAX_BUFFER_SIZE;
while(mok) {
#ifdef SPI_READ_HIGHSPEED
ioboard_spi_read_memory_highspeed(spi, addr + offset, &rdata[offset], SPI_MAX_BUFFER_SIZE);
#else
ioboard_spi_read_memory(spi, addr + offset, &rdata[offset], SPI_MAX_BUFFER_SIZE);
#endif
offset += SPI_MAX_BUFFER_SIZE; mok = mok - 1;
}
if(na) {
#ifdef SPI_READ_HIGHSPEED
ioboard_spi_read_memory_highspeed(spi, addr + offset, &rdata[offset], na);
#else
ioboard_spi_read_memory(spi, addr + offset, &rdata[offset], na);
#endif
}
return 0;
......@@ -326,6 +337,7 @@ static void ioboard_spi_wp_disable (unsigned char disable)
}
//[*]--------------------------------------------------------------------------------------------------[*]
#ifdef CONFIG_ODROID_EXYNOS5_IOBOARD_DEBUG
static void ioboard_spi_test (struct spi_device *spi)
{
unsigned char wdata[64], rdata[64];
......@@ -367,6 +379,7 @@ static void ioboard_spi_test (struct spi_device *spi)
pr_info("[0x%02X] ", rdata[i]);
}
}
#endif
//[*]--------------------------------------------------------------------------------------------------[*]
static int ioboard_spi_probe (struct spi_device *spi)
......@@ -396,7 +409,7 @@ static int ioboard_spi_probe (struct spi_device *spi)
goto err;
}
#if defined(CONFIG_ODROID_EXYNOS5_IOBOARD_DEBUG)
#if defined(CONFIG_ODROID_EXYNOS5_IOBOARD_DEBUG)
ioboard_spi_test(spi);
#endif
......
......@@ -256,7 +256,7 @@ out:
return 0;
}
static void appleir_input_configured(struct hid_device *hid,
static int appleir_input_configured(struct hid_device *hid,
struct hid_input *hidinput)
{
struct input_dev *input_dev = hidinput->input;
......@@ -275,6 +275,8 @@ static void appleir_input_configured(struct hid_device *hid,
for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++)
set_bit(appleir->keymap[i], input_dev->keybit);
clear_bit(KEY_RESERVED, input_dev->keybit);
return 0;
}
static int appleir_input_mapping(struct hid_device *hid,
......
......@@ -471,18 +471,22 @@ static int magicmouse_input_mapping(struct hid_device *hdev,
return 0;
}
static void magicmouse_input_configured(struct hid_device *hdev,
static int magicmouse_input_configured(struct hid_device *hdev,
struct hid_input *hi)
{
struct magicmouse_sc *msc = hid_get_drvdata(hdev);
int ret;
int ret = magicmouse_setup_input(msc->input, hdev);
ret = magicmouse_setup_input(msc->input, hdev);
if (ret) {
hid_err(hdev, "magicmouse setup input failed (%d)\n", ret);
/* clean msc->input to notify probe() of the failure */
msc->input = NULL;
return ret;
}
return 0;
}
......
......@@ -859,14 +859,14 @@ not_claimed_input:
return 1;
}
static void ntrig_input_configured(struct hid_device *hid,
static int ntrig_input_configured(struct hid_device *hid,
struct hid_input *hidinput)
{
struct input_dev *input = hidinput->input;
if (hidinput->report->maxfield < 1)
return;
return 0;
switch (hidinput->report->field[0]->application) {
case HID_DG_PEN:
......@@ -890,6 +890,8 @@ static void ntrig_input_configured(struct hid_device *hid,
"N-Trig MultiTouch";
break;
}
return 0;
}
static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
......
......@@ -2105,6 +2105,7 @@ static struct video_device s5p_mfc_enc_videodev = {
.release = video_device_release,
};
#ifndef CONFIG_MACH_ODROIDXU3
static struct video_device s5p_mfc_dec_drm_videodev = {
.name = S5P_MFC_DEC_DRM_NAME,
.fops = &s5p_mfc_fops,
......@@ -2118,6 +2119,7 @@ static struct video_device s5p_mfc_enc_drm_videodev = {
.minor = -1,
.release = video_device_release,
};
#endif
static void *mfc_get_drv_data(struct platform_device *pdev);
......@@ -2336,8 +2338,9 @@ static int s5p_mfc_probe(struct platform_device *pdev)
video_set_drvdata(vfd, dev);
#ifndef CONFIG_MACH_ODROIDXU3
/* secure decoder */
/* vfd = video_device_alloc();
vfd = video_device_alloc();
if (!vfd) {
v4l2_err(&dev->v4l2_dev, "Failed to allocate video device\n");
ret = -ENOMEM;
......@@ -2363,10 +2366,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
vfd->num);
dev->vfd_dec_drm = vfd;
video_set_drvdata(vfd, dev); */
video_set_drvdata(vfd, dev);
/* secure encoder */
/* vfd = video_device_alloc();
vfd = video_device_alloc();
if (!vfd) {
v4l2_err(&dev->v4l2_dev, "Failed to allocate video device\n");
ret = -ENOMEM;
......@@ -2391,8 +2394,9 @@ static int s5p_mfc_probe(struct platform_device *pdev)
vfd->num);
dev->vfd_enc_drm = vfd;
video_set_drvdata(vfd, dev); */
video_set_drvdata(vfd, dev);
/* end of node setting*/
#endif
platform_set_drvdata(pdev, dev);
......
......@@ -17,6 +17,14 @@
#include "xhci.h"
#ifdef CONFIG_MACH_ODROIDXU3
#define USB3_PORT0_IRQ 104
#define USB3_PORT1_IRQ 105
// function defined at drivers/usb/phy/phy-samsung-usb3.c
extern void samsung_usb3phy_retune(int);
#endif
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
{
/*
......@@ -148,15 +156,11 @@ static int xhci_plat_probe(struct platform_device *pdev)
ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
if (ret)
goto put_usb3_hcd;
#if defined(CONFIG_MACH_ODROIDXU3)
#define USB3_PORT0_IRQ 104
#define USB3_PORT1_IRQ 105
// function defined at drivers/usb/phy/phy-samsung-usb3.c
extern void samsung_usb3phy_retune(int);
if(irq == USB3_PORT0_IRQ) samsung_usb3phy_retune(0);
else samsung_usb3phy_retune(1);
#ifdef CONFIG_MACH_ODROIDXU3
if(irq == USB3_PORT0_IRQ)
samsung_usb3phy_retune(0);
else
samsung_usb3phy_retune(1);
#endif
return 0;
......
......@@ -3503,12 +3503,12 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct xhci_virt_device *virt_dev;
struct device *dev = hcd->self.controller;
unsigned long flags;
u32 state;
int i, ret;
#ifndef CONFIG_USB_DEFAULT_PERSIST
struct device *dev = hcd->self.controller;
/*
* We called pm_runtime_get_noresume when the device was attached.
* Decrement the counter here to allow controller to runtime suspend
......@@ -3589,7 +3589,9 @@ static int xhci_reserve_host_control_ep_resources(struct xhci_hcd *xhci)
int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
#ifndef CONFIG_USB_DEFAULT_PERSIST
struct device *dev = hcd->self.controller;
#endif
unsigned long flags;
int timeleft;
int ret;
......
......@@ -396,12 +396,12 @@ static int parse_command(const char __user *buffer, size_t count)
{
char s[4];
if (!count)
return 0;
if (count > 3)
return -EINVAL;
if (copy_from_user(s, buffer, count))
return -EFAULT;
if (!count)
return 0;
if (s[count-1] == '\n')
count--;
if (count == 1 && s[0] == '0')
......
......@@ -21,7 +21,6 @@
#include <net/net_ratelimit.h>
static int zero = 0;
static int one = 1;
static int ushort_max = USHRT_MAX;
static int min_sndbuf = SOCK_MIN_SNDBUF;
static int min_rcvbuf = SOCK_MIN_RCVBUF;
......
......@@ -30,17 +30,18 @@ struct rfkill_regulator_data {
static int rfkill_regulator_set_block(void *data, bool blocked)
{
struct rfkill_regulator_data *rfkill_data = data;
int ret = 0;
pr_debug("%s: blocked: %d\n", __func__, blocked);
if (blocked) {
if (rfkill_data->reg_enabled) {
regulator_disable(rfkill_data->vcc);
ret = regulator_disable(rfkill_data->vcc);
rfkill_data->reg_enabled = false;
}
} else {
if (!rfkill_data->reg_enabled) {
regulator_enable(rfkill_data->vcc);
ret = regulator_enable(rfkill_data->vcc);
rfkill_data->reg_enabled = true;
}
}
......@@ -48,7 +49,7 @@ static int rfkill_regulator_set_block(void *data, bool blocked)
pr_debug("%s: regulator_is_enabled after set_block: %d\n", __func__,
regulator_is_enabled(rfkill_data->vcc));
return 0;
return ret;
}
static struct rfkill_ops rfkill_regulator_ops = {
......
......@@ -715,7 +715,7 @@ static int lpass_proc_show(struct seq_file *m, void *v) {
}
list_for_each_entry(ar, &reg_list, node) {
seq_printf(m, "reg_list: 0x%08x (0x%08x)\n",
ar->reg, ar->val);
(u32)ar->reg, ar->val);
}
return 0;
}
......
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