Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249009
b: refs/heads/master
c: 711908d
h: refs/heads/master
i:
  249007: d471d31
v: v3
  • Loading branch information
Luis R. Rodriguez authored and Greg Kroah-Hartman committed Apr 5, 2011
1 parent f22ec5f commit ceac856
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e7fd280fb1eb8a870d223fdfe4821d318001af5
refs/heads/master: 711908df76bedee2df653be057465168ed626742
32 changes: 14 additions & 18 deletions trunk/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,27 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif,
/* ------ Functions ------ */
int HIFInit(OSDRV_CALLBACKS *callbacks)
{
int status;
AR_DEBUG_ASSERT(callbacks != NULL);
int r;
AR_DEBUG_ASSERT(callbacks != NULL);

A_REGISTER_MODULE_DEBUG_INFO(hif);

A_REGISTER_MODULE_DEBUG_INFO(hif);
/* store the callback handlers */
osdrvCallbacks = *callbacks;

/* store the callback handlers */
osdrvCallbacks = *callbacks;
/* Register with bus driver core */
registered = 1;

/* Register with bus driver core */
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: HIFInit registering\n"));
registered = 1;
#if defined(CONFIG_PM)
if (callbacks->deviceSuspendHandler && callbacks->deviceResumeHandler) {
ar6k_driver.drv.pm = &ar6k_device_pm_ops;
}
if (callbacks->deviceSuspendHandler && callbacks->deviceResumeHandler)
ar6k_driver.drv.pm = &ar6k_device_pm_ops;
#endif /* CONFIG_PM */
status = sdio_register_driver(&ar6k_driver);
AR_DEBUG_ASSERT(status==0);

if (status != 0) {
return A_ERROR;
}

return 0;
r = sdio_register_driver(&ar6k_driver);
if (r < 0)
return r;

return 0;
}

static int
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/staging/ath6kl/os/linux/ar6000_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static int __init
ar6000_init_module(void)
{
static int probed = 0;
int status;
int r;
OSDRV_CALLBACKS osdrvCallbacks;

a_module_debug_support_init();
Expand Down Expand Up @@ -636,7 +636,9 @@ ar6000_init_module(void)
osdrvCallbacks.devicePowerChangeHandler = ar6000_power_change_ev;
#endif

ar6000_pm_init();
r = ar6000_pm_init();
if (r)
return r;

#ifdef DEBUG
/* Set the debug flags if specified at load time */
Expand All @@ -655,9 +657,9 @@ ar6000_init_module(void)
memset(&aptcTR, 0, sizeof(APTC_TRAFFIC_RECORD));
#endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */

status = HIFInit(&osdrvCallbacks);
if (status)
return -ENODEV;
r = HIFInit(&osdrvCallbacks);
if (r)
return r;

return 0;
}
Expand Down
26 changes: 15 additions & 11 deletions trunk/drivers/staging/ath6kl/os/linux/ar6000_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,24 +660,28 @@ ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
return status;
}

void ar6000_pm_init()
int ar6000_pm_init()
{
A_REGISTER_MODULE_DEBUG_INFO(pm);
int r;
A_REGISTER_MODULE_DEBUG_INFO(pm);

#ifdef CONFIG_PM
/*
* Register ar6000_pm_device into system.
* We should also add platform_device into the first item of array
* of devices[] in file arch/xxx/mach-xxx/board-xxxx.c
*/
if (platform_driver_register(&ar6000_pm_device)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000: fail to register the power control driver.\n"));
}
/*
* Register ar6000_pm_device into system.
* We should also add platform_device into the first item of array
* of devices[] in file arch/xxx/mach-xxx/board-xxxx.c
*/
r = platform_driver_register(&ar6000_pm_device);
if (r < 0)
return -ENODEV;
#endif /* CONFIG_PM */

return 0;
}

void ar6000_pm_exit()
{
#ifdef CONFIG_PM
platform_driver_unregister(&ar6000_pm_device);
platform_driver_unregister(&ar6000_pm_device);
#endif /* CONFIG_PM */
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ int ar6000_power_change_ev(void *context, u32 config);
void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bool isEvent);
#endif

void ar6000_pm_init(void);
int ar6000_pm_init(void);
void ar6000_pm_exit(void);

#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
Expand Down

0 comments on commit ceac856

Please sign in to comment.