[PATCH] memstick: fix attribute structure casting in mspro_block_resume

2008-02-09 Thread Alex Dubov
Signed-off-by: Alex Dubov <[EMAIL PROTECTED]>
---
 drivers/memstick/core/mspro_block.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/memstick/core/mspro_block.c 
b/drivers/memstick/core/mspro_block.c
index b9bd0aa..423ad8c 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -1237,7 +1237,7 @@ static int mspro_block_resume(struct memstick_dev *card)
 
struct mspro_block_data *new_msb;
struct memstick_host *host = card->host;
-   struct mspro_sys_attr s_attr, r_attr;
+   struct mspro_sys_attr *s_attr, *r_attr;
unsigned char cnt;
 
mutex_lock(>lock);
@@ -1254,12 +1254,8 @@ static int mspro_block_resume(struct memstick_dev *card)
 
for (cnt = 0; new_msb->attr_group.attrs[cnt]
  && msb->attr_group.attrs[cnt]; ++cnt) {
-   s_attr = container_of(new_msb->attr_group.attrs[cnt],
- struct mspro_sys_attr,
- dev_attr);
-   r_attr = container_of(msb->attr_group.attrs[cnt],
- struct mspro_sys_attr,
- dev_attr);
+   s_attr = mspro_from_sysfs_attr(new_msb->attr_group.attrs[cnt]);
+   r_attr = mspro_from_sysfs_attr(msb->attr_group.attrs[cnt]);
 
if (s_attr->id == MSPRO_BLOCK_ID_SYSINFO
&& r_attr->id == s_attr->id) {
-- 
1.5.3.6


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] memstick: fix attribute structure casting in mspro_block_resume

2008-02-09 Thread Alex Dubov
Signed-off-by: Alex Dubov [EMAIL PROTECTED]
---
 drivers/memstick/core/mspro_block.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/memstick/core/mspro_block.c 
b/drivers/memstick/core/mspro_block.c
index b9bd0aa..423ad8c 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -1237,7 +1237,7 @@ static int mspro_block_resume(struct memstick_dev *card)
 
struct mspro_block_data *new_msb;
struct memstick_host *host = card-host;
-   struct mspro_sys_attr s_attr, r_attr;
+   struct mspro_sys_attr *s_attr, *r_attr;
unsigned char cnt;
 
mutex_lock(host-lock);
@@ -1254,12 +1254,8 @@ static int mspro_block_resume(struct memstick_dev *card)
 
for (cnt = 0; new_msb-attr_group.attrs[cnt]
   msb-attr_group.attrs[cnt]; ++cnt) {
-   s_attr = container_of(new_msb-attr_group.attrs[cnt],
- struct mspro_sys_attr,
- dev_attr);
-   r_attr = container_of(msb-attr_group.attrs[cnt],
- struct mspro_sys_attr,
- dev_attr);
+   s_attr = mspro_from_sysfs_attr(new_msb-attr_group.attrs[cnt]);
+   r_attr = mspro_from_sysfs_attr(msb-attr_group.attrs[cnt]);
 
if (s_attr-id == MSPRO_BLOCK_ID_SYSINFO
 r_attr-id == s_attr-id) {
-- 
1.5.3.6


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/