Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2361
b: refs/heads/master
c: 9a881f1
h: refs/heads/master
i:
  2359: 6fd751d
v: v3
  • Loading branch information
gregkh@suse.de committed Jun 20, 2005
1 parent d5f28a6 commit 32323fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 20b1e674230b642be662c5975923a0160ab9cbdc
refs/heads/master: 9a881f166f473373589ce6f3fdc47b44a1450e2d
16 changes: 10 additions & 6 deletions trunk/drivers/scsi/scsi_transport_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,17 +348,21 @@ spi_transport_rd_attr(rd_strm, "%d\n");
spi_transport_rd_attr(rti, "%d\n");
spi_transport_rd_attr(pcomp_en, "%d\n");

/* we only care about the first child device so we return 1 */
static int child_iter(struct device *dev, void *data)
{
struct scsi_device *sdev = to_scsi_device(dev);

spi_dv_device(sdev);
return 1;
}

static ssize_t
store_spi_revalidate(struct class_device *cdev, const char *buf, size_t count)
{
struct scsi_target *starget = transport_class_to_starget(cdev);

/* FIXME: we're relying on an awful lot of device internals
* here. We really need a function to get the first available
* child */
struct device *dev = container_of(starget->dev.children.next, struct device, node);
struct scsi_device *sdev = to_scsi_device(dev);
spi_dv_device(sdev);
device_for_each_child(&starget->dev, NULL, child_iter);
return count;
}
static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate);
Expand Down

0 comments on commit 32323fa

Please sign in to comment.