diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 91f5faee740..f9efd069edc 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1420,58 +1420,6 @@ static void ide_port_cable_detect(ide_hwif_t *hwif) | |||
1420 | } | 1420 | } |
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | static ssize_t store_delete_devices(struct device *portdev, | ||
1424 | struct device_attribute *attr, | ||
1425 | const char *buf, size_t n) | ||
1426 | { | ||
1427 | ide_hwif_t *hwif = dev_get_drvdata(portdev); | ||
1428 | |||
1429 | if (strncmp(buf, "1", n)) | ||
1430 | return -EINVAL; | ||
1431 | |||
1432 | ide_port_unregister_devices(hwif); | ||
1433 | |||
1434 | return n; | ||
1435 | }; | ||
1436 | |||
1437 | static DEVICE_ATTR(delete_devices, S_IWUSR, NULL, store_delete_devices); | ||
1438 | |||
1439 | static ssize_t store_scan(struct device *portdev, | ||
1440 | struct device_attribute *attr, | ||
1441 | const char *buf, size_t n) | ||
1442 | { | ||
1443 | ide_hwif_t *hwif = dev_get_drvdata(portdev); | ||
1444 | |||
1445 | if (strncmp(buf, "1", n)) | ||
1446 | return -EINVAL; | ||
1447 | |||
1448 | ide_port_unregister_devices(hwif); | ||
1449 | ide_port_scan(hwif); | ||
1450 | |||
1451 | return n; | ||
1452 | }; | ||
1453 | |||
1454 | static DEVICE_ATTR(scan, S_IWUSR, NULL, store_scan); | ||
1455 | |||
1456 | static struct device_attribute *ide_port_attrs[] = { | ||
1457 | &dev_attr_delete_devices, | ||
1458 | &dev_attr_scan, | ||
1459 | NULL | ||
1460 | }; | ||
1461 | |||
1462 | static int ide_sysfs_register_port(ide_hwif_t *hwif) | ||
1463 | { | ||
1464 | int i, uninitialized_var(rc); | ||
1465 | |||
1466 | for (i = 0; ide_port_attrs[i]; i++) { | ||
1467 | rc = device_create_file(hwif->portdev, ide_port_attrs[i]); | ||
1468 | if (rc) | ||
1469 | break; | ||
1470 | } | ||
1471 | |||
1472 | return rc; | ||
1473 | } | ||
1474 | |||
1475 | static unsigned int ide_indexes; | 1423 | static unsigned int ide_indexes; |
1476 | 1424 | ||
1477 | /** | 1425 | /** |