Commit b2936d3a authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] fix rescan warning

The prototype for scsi_rescan_device was missing and once added it's
caller doesn't compile anymore because it expects a return value..
parent d189d057
...@@ -442,6 +442,7 @@ extern void scsi_finish_command(Scsi_Cmnd *); ...@@ -442,6 +442,7 @@ extern void scsi_finish_command(Scsi_Cmnd *);
extern int scsi_retry_command(Scsi_Cmnd *); extern int scsi_retry_command(Scsi_Cmnd *);
extern int scsi_attach_device(struct scsi_device *); extern int scsi_attach_device(struct scsi_device *);
extern void scsi_detach_device(struct scsi_device *); extern void scsi_detach_device(struct scsi_device *);
extern void scsi_rescan_device(struct scsi_device *);
extern int scsi_get_device_flags(unsigned char *vendor, unsigned char *model); extern int scsi_get_device_flags(unsigned char *vendor, unsigned char *model);
/* /*
......
...@@ -275,12 +275,8 @@ show_rescan_field (struct device *dev, char *buf) ...@@ -275,12 +275,8 @@ show_rescan_field (struct device *dev, char *buf)
static ssize_t static ssize_t
store_rescan_field (struct device *dev, const char *buf, size_t count) store_rescan_field (struct device *dev, const char *buf, size_t count)
{ {
int ret = ENODEV; scsi_rescan_device(to_scsi_device(dev));
struct scsi_device *sdev; return 0;
sdev = to_scsi_device(dev);
if (sdev)
ret = scsi_rescan_device(sdev);
return ret;
} }
static DEVICE_ATTR(rescan, S_IRUGO | S_IWUSR, show_rescan_field, store_rescan_field) static DEVICE_ATTR(rescan, S_IRUGO | S_IWUSR, show_rescan_field, store_rescan_field)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment