#include <linux/libata.h>
#define DRV_NAME "pata_pdc2027x"
-#define DRV_VERSION "0.9"
+#define DRV_VERSION "1.0"
#undef PDC_DEBUG
#ifdef PDC_DEBUG
*/
static int pdc2027x_set_mode(struct ata_port *ap, struct ata_device **r_failed)
{
- int i;
-
- i = ata_do_set_mode(ap, r_failed);
- if (i < 0)
- return i;
+ struct ata_device *dev;
+ int rc;
- for (i = 0; i < ATA_MAX_DEVICES; i++) {
- struct ata_device *dev = &ap->device[i];
+ rc = ata_do_set_mode(ap, r_failed);
+ if (rc < 0)
+ return rc;
+ ata_link_for_each_dev(dev, &ap->link) {
if (ata_dev_enabled(dev)) {
pdc2027x_set_piomode(ap, dev);