Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220128
b: refs/heads/master
c: 54930e8
h: refs/heads/master
v: v3
  • Loading branch information
David Cross authored and Greg Kroah-Hartman committed Oct 6, 2010
1 parent 4eba29e commit 1a578de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d11a5c6e683a76a1439b323194921c19e255ceac
refs/heads/master: 54930e889238200d82d3a35cc12fae4b5f5c22f5
18 changes: 18 additions & 0 deletions trunk/drivers/staging/westbridge/astoria/device/cyasdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ typedef struct cyasdevice {
cy_as_device_handle dev_handle;
/* Handle to the HAL */
cy_as_hal_device_tag hal_tag;
spinlock_t common_lock;
unsigned long flags;
} cyasdevice;

/* global ptr to astoria device */
Expand Down Expand Up @@ -126,6 +128,20 @@ static void cy_misc_callback(cy_as_device_handle h,
}
}

void cy_as_acquire_common_lock()
{
spin_lock_irqsave(&cy_as_device_controller->common_lock,
cy_as_device_controller->flags);
}
EXPORT_SYMBOL(cy_as_acquire_common_lock);

void cy_as_release_common_lock()
{
spin_unlock_irqrestore(&cy_as_device_controller->common_lock,
cy_as_device_controller->flags);
}
EXPORT_SYMBOL(cy_as_release_common_lock);

/* reset astoria and reinit all regs */
#define PNAND_REG_CFG_INIT_VAL 0x0000
void hal_reset(cy_as_hal_device_tag tag)
Expand Down Expand Up @@ -331,6 +347,8 @@ static int cyasdevice_initialize(void)
((ver_data.is_debug_mode) ? "debug" : "release"),
ver_data.major, ver_data.minor, ver_data.build, str);

spin_lock_init(&cy_as_dev->common_lock);

/* done now */
cy_as_device_controller = cy_as_dev;

Expand Down

0 comments on commit 1a578de

Please sign in to comment.