#include #include #include #include "promisc.h" #include "dev.h" short enter_promiscuous_mode(char *ifname) { short ifflags; if (!strncmp("any", ifname, strlen("any"))) return 0; ifflags = device_get_flags(ifname); device_set_flags(ifname, ifflags | IFF_PROMISC); return ifflags; } void leave_promiscuous_mode(char *ifname, short oldflags) { if (!strncmp("any", ifname, strlen("any"))) return; device_set_flags(ifname, oldflags); } ///git.distanz.ch/cgit.cgi/linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2016-07-12 14:31:23 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-07-15 12:33:52 -0400
commitbec5f70dad45f7ad63f97aa0988821532ebeade7 (patch)
tree54b4eb672d50af85c535babd81283efc216d6c74
parente68d46484ff453c5aaf215da07f57a2cc29967f9 (diff)
drm/amd/powerplay: fix the incorrect return value
The return value 0 (false) means fail to find GPIO in atomctrl_get_pp_assign_pin. "-1" returns true as bool actually. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: <stable@vger.kernel.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c