Commit 257514ddce752fe0b4aeb4b7957bc5661eadbef8

Authored by pbrook
1 parent 5747c073

sd.c build fix.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3673 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
... ... @@ -371,8 +371,8 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv)
371 371  
372 372 sd->bdrv = bdrv;
373 373  
374   - if (s->wp_groups)
375   - qemu_free(s->wp_groups);
  374 + if (sd->wp_groups)
  375 + qemu_free(sd->wp_groups);
376 376 sd->wp_switch = bdrv_is_read_only(bdrv);
377 377 sd->wp_groups = (int *) qemu_mallocz(sizeof(int) * sect);
378 378 memset(sd->wp_groups, 0, sizeof(int) * sect);
... ... @@ -390,7 +390,7 @@ static void sd_cardchange(void *opaque)
390 390 qemu_set_irq(sd->inserted_cb, bdrv_is_inserted(sd->bdrv));
391 391 if (bdrv_is_inserted(sd->bdrv)) {
392 392 sd_reset(sd, sd->bdrv);
393   - qemu_set_irq(s->readonly_cb, sd->wp_switch);
  393 + qemu_set_irq(sd->readonly_cb, sd->wp_switch);
394 394 }
395 395 }
396 396  
... ...