Attached patch will const-ify lots of functions within drivers/ata. Patch is an extract from grsecurity. Please apply. Signed-off-by: Hanno Boeck <hanno@xxxxxxxxx> --- diff -Naur linux-2.6.38/drivers/ata//acard-ahci.c linux-2.6.38-ata/drivers/ata//acard-ahci.c --- linux-2.6.38/drivers/ata//acard-ahci.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//acard-ahci.c 2011-04-08 00:02:57.656880807 +0200 @@ -87,7 +87,7 @@ AHCI_SHT("acard-ahci"), }; -static struct ata_port_operations acard_ops = { +static const struct ata_port_operations acard_ops = { .inherits = &ahci_ops, .qc_prep = acard_ahci_qc_prep, .qc_fill_rtf = acard_ahci_qc_fill_rtf, diff -Naur linux-2.6.38/drivers/ata//ahci.c linux-2.6.38-ata/drivers/ata//ahci.c --- linux-2.6.38/drivers/ata//ahci.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//ahci.c 2011-04-08 00:02:57.669880734 +0200 @@ -94,17 +94,17 @@ AHCI_SHT("ahci"), }; -static struct ata_port_operations ahci_vt8251_ops = { +static const struct ata_port_operations ahci_vt8251_ops = { .inherits = &ahci_ops, .hardreset = ahci_vt8251_hardreset, }; -static struct ata_port_operations ahci_p5wdh_ops = { +static const struct ata_port_operations ahci_p5wdh_ops = { .inherits = &ahci_ops, .hardreset = ahci_p5wdh_hardreset, }; -static struct ata_port_operations ahci_sb600_ops = { +static const struct ata_port_operations ahci_sb600_ops = { .inherits = &ahci_ops, .softreset = ahci_sb600_softreset, .pmp_softreset = ahci_sb600_softreset, diff -Naur linux-2.6.38/drivers/ata//ahci.h linux-2.6.38-ata/drivers/ata//ahci.h --- linux-2.6.38/drivers/ata//ahci.h 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//ahci.h 2011-04-08 00:02:57.671880724 +0200 @@ -309,7 +309,7 @@ .shost_attrs = ahci_shost_attrs, \ .sdev_attrs = ahci_sdev_attrs -extern struct ata_port_operations ahci_ops; +extern const struct ata_port_operations ahci_ops; void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, u32 opts); diff -Naur linux-2.6.38/drivers/ata//ata_generic.c linux-2.6.38-ata/drivers/ata//ata_generic.c --- linux-2.6.38/drivers/ata//ata_generic.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//ata_generic.c 2011-04-08 00:02:57.671880724 +0200 @@ -101,7 +101,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations generic_port_ops = { +static const struct ata_port_operations generic_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_unknown, .set_mode = generic_set_mode, diff -Naur linux-2.6.38/drivers/ata//ata_piix.c linux-2.6.38-ata/drivers/ata//ata_piix.c --- linux-2.6.38/drivers/ata//ata_piix.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//ata_piix.c 2011-04-08 00:02:57.671880724 +0200 @@ -327,12 +327,12 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations piix_sata_ops = { +static const struct ata_port_operations piix_sata_ops = { .inherits = &ata_bmdma32_port_ops, .sff_irq_check = piix_irq_check, }; -static struct ata_port_operations piix_pata_ops = { +static const struct ata_port_operations piix_pata_ops = { .inherits = &piix_sata_ops, .cable_detect = ata_cable_40wire, .set_piomode = piix_set_piomode, @@ -340,12 +340,12 @@ .prereset = piix_pata_prereset, }; -static struct ata_port_operations piix_vmw_ops = { +static const struct ata_port_operations piix_vmw_ops = { .inherits = &piix_pata_ops, .bmdma_status = piix_vmw_bmdma_status, }; -static struct ata_port_operations ich_pata_ops = { +static const struct ata_port_operations ich_pata_ops = { .inherits = &piix_pata_ops, .cable_detect = ich_pata_cable_detect, .set_dmamode = ich_set_dmamode, @@ -361,7 +361,7 @@ .shost_attrs = piix_sidpr_shost_attrs, }; -static struct ata_port_operations piix_sidpr_sata_ops = { +static const struct ata_port_operations piix_sidpr_sata_ops = { .inherits = &piix_sata_ops, .hardreset = sata_std_hardreset, .scr_read = piix_sidpr_scr_read, diff -Naur linux-2.6.38/drivers/ata//libahci.c linux-2.6.38-ata/drivers/ata//libahci.c --- linux-2.6.38/drivers/ata//libahci.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//libahci.c 2011-04-08 00:02:57.672880718 +0200 @@ -137,7 +137,7 @@ }; EXPORT_SYMBOL_GPL(ahci_sdev_attrs); -struct ata_port_operations ahci_ops = { +const struct ata_port_operations ahci_ops = { .inherits = &sata_pmp_port_ops, .qc_defer = ahci_pmp_qc_defer, diff -Naur linux-2.6.38/drivers/ata//libata-acpi.c linux-2.6.38-ata/drivers/ata//libata-acpi.c --- linux-2.6.38/drivers/ata//libata-acpi.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//libata-acpi.c 2011-04-08 00:02:57.679880678 +0200 @@ -218,12 +218,12 @@ ata_acpi_uevent(dev->link->ap, dev, event); } -static struct acpi_dock_ops ata_acpi_dev_dock_ops = { +static const struct acpi_dock_ops ata_acpi_dev_dock_ops = { .handler = ata_acpi_dev_notify_dock, .uevent = ata_acpi_dev_uevent, }; -static struct acpi_dock_ops ata_acpi_ap_dock_ops = { +static const struct acpi_dock_ops ata_acpi_ap_dock_ops = { .handler = ata_acpi_ap_notify_dock, .uevent = ata_acpi_ap_uevent, }; diff -Naur linux-2.6.38/drivers/ata//libata-core.c linux-2.6.38-ata/drivers/ata//libata-core.c --- linux-2.6.38/drivers/ata//libata-core.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//libata-core.c 2011-04-08 00:02:57.684880650 +0200 @@ -5755,7 +5755,7 @@ * LOCKING: * None. */ -static void ata_finalize_port_ops(struct ata_port_operations *ops) +static void ata_finalize_port_ops(const struct ata_port_operations *ops) { static DEFINE_SPINLOCK(lock); const struct ata_port_operations *cur; @@ -5878,7 +5878,7 @@ */ /* KILLME - the only user left is ipr */ void ata_host_init(struct ata_host *host, struct device *dev, - unsigned long flags, struct ata_port_operations *ops) + unsigned long flags, const struct ata_port_operations *ops) { spin_lock_init(&host->lock); mutex_init(&host->eh_mutex); @@ -6584,7 +6584,7 @@ /* truly dummy */ } -struct ata_port_operations ata_dummy_port_ops = { +const struct ata_port_operations ata_dummy_port_ops = { .qc_prep = ata_noop_qc_prep, .qc_issue = ata_dummy_qc_issue, .error_handler = ata_dummy_error_handler, diff -Naur linux-2.6.38/drivers/ata//libata-eh.c linux-2.6.38-ata/drivers/ata//libata-eh.c --- linux-2.6.38/drivers/ata//libata-eh.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//libata-eh.c 2011-04-08 00:02:57.697880575 +0200 @@ -3880,7 +3880,7 @@ */ void ata_std_error_handler(struct ata_port *ap) { - struct ata_port_operations *ops = ap->ops; + const struct ata_port_operations *ops = ap->ops; ata_reset_fn_t hardreset = ops->hardreset; /* ignore built-in hardreset if SCR access is not available */ diff -Naur linux-2.6.38/drivers/ata//libata-pmp.c linux-2.6.38-ata/drivers/ata//libata-pmp.c --- linux-2.6.38/drivers/ata//libata-pmp.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//libata-pmp.c 2011-04-08 00:02:57.697880575 +0200 @@ -912,7 +912,7 @@ */ static int sata_pmp_eh_recover(struct ata_port *ap) { - struct ata_port_operations *ops = ap->ops; + const struct ata_port_operations *ops = ap->ops; int pmp_tries, link_tries[SATA_PMP_MAX_PORTS]; struct ata_link *pmp_link = &ap->link; struct ata_device *pmp_dev = pmp_link->device; diff -Naur linux-2.6.38/drivers/ata//pata_acpi.c linux-2.6.38-ata/drivers/ata//pata_acpi.c --- linux-2.6.38/drivers/ata//pata_acpi.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_acpi.c 2011-04-08 00:02:57.697880575 +0200 @@ -216,7 +216,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations pacpi_ops = { +static const struct ata_port_operations pacpi_ops = { .inherits = &ata_bmdma_port_ops, .qc_issue = pacpi_qc_issue, .cable_detect = pacpi_cable_detect, diff -Naur linux-2.6.38/drivers/ata//pata_ali.c linux-2.6.38-ata/drivers/ata//pata_ali.c --- linux-2.6.38/drivers/ata//pata_ali.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_ali.c 2011-04-08 00:02:57.699880564 +0200 @@ -363,7 +363,7 @@ * Port operations for PIO only ALi */ -static struct ata_port_operations ali_early_port_ops = { +static const struct ata_port_operations ali_early_port_ops = { .inherits = &ata_sff_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = ali_set_piomode, @@ -380,7 +380,7 @@ * Port operations for DMA capable ALi without cable * detect */ -static struct ata_port_operations ali_20_port_ops = { +static const struct ata_port_operations ali_20_port_ops = { .inherits = &ali_dma_base_ops, .cable_detect = ata_cable_40wire, .mode_filter = ali_20_filter, @@ -391,7 +391,7 @@ /* * Port operations for DMA capable ALi with cable detect */ -static struct ata_port_operations ali_c2_port_ops = { +static const struct ata_port_operations ali_c2_port_ops = { .inherits = &ali_dma_base_ops, .check_atapi_dma = ali_check_atapi_dma, .cable_detect = ali_c2_cable_detect, @@ -402,7 +402,7 @@ /* * Port operations for DMA capable ALi with cable detect */ -static struct ata_port_operations ali_c4_port_ops = { +static const struct ata_port_operations ali_c4_port_ops = { .inherits = &ali_dma_base_ops, .check_atapi_dma = ali_check_atapi_dma, .cable_detect = ali_c2_cable_detect, @@ -412,7 +412,7 @@ /* * Port operations for DMA capable ALi with cable detect and LBA48 */ -static struct ata_port_operations ali_c5_port_ops = { +static const struct ata_port_operations ali_c5_port_ops = { .inherits = &ali_dma_base_ops, .check_atapi_dma = ali_check_atapi_dma, .dev_config = ali_warn_atapi_dma, diff -Naur linux-2.6.38/drivers/ata//pata_amd.c linux-2.6.38-ata/drivers/ata//pata_amd.c --- linux-2.6.38/drivers/ata//pata_amd.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_amd.c 2011-04-08 00:02:57.707880520 +0200 @@ -397,28 +397,28 @@ .prereset = amd_pre_reset, }; -static struct ata_port_operations amd33_port_ops = { +static const struct ata_port_operations amd33_port_ops = { .inherits = &amd_base_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = amd33_set_piomode, .set_dmamode = amd33_set_dmamode, }; -static struct ata_port_operations amd66_port_ops = { +static const struct ata_port_operations amd66_port_ops = { .inherits = &amd_base_port_ops, .cable_detect = ata_cable_unknown, .set_piomode = amd66_set_piomode, .set_dmamode = amd66_set_dmamode, }; -static struct ata_port_operations amd100_port_ops = { +static const struct ata_port_operations amd100_port_ops = { .inherits = &amd_base_port_ops, .cable_detect = ata_cable_unknown, .set_piomode = amd100_set_piomode, .set_dmamode = amd100_set_dmamode, }; -static struct ata_port_operations amd133_port_ops = { +static const struct ata_port_operations amd133_port_ops = { .inherits = &amd_base_port_ops, .cable_detect = amd_cable_detect, .set_piomode = amd133_set_piomode, @@ -433,13 +433,13 @@ .host_stop = nv_host_stop, }; -static struct ata_port_operations nv100_port_ops = { +static const struct ata_port_operations nv100_port_ops = { .inherits = &nv_base_port_ops, .set_piomode = nv100_set_piomode, .set_dmamode = nv100_set_dmamode, }; -static struct ata_port_operations nv133_port_ops = { +static const struct ata_port_operations nv133_port_ops = { .inherits = &nv_base_port_ops, .set_piomode = nv133_set_piomode, .set_dmamode = nv133_set_dmamode, diff -Naur linux-2.6.38/drivers/ata//pata_artop.c linux-2.6.38-ata/drivers/ata//pata_artop.c --- linux-2.6.38/drivers/ata//pata_artop.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_artop.c 2011-04-08 00:02:57.713880485 +0200 @@ -312,7 +312,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations artop6210_ops = { +static const struct ata_port_operations artop6210_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = artop6210_set_piomode, @@ -321,7 +321,7 @@ .qc_defer = artop6210_qc_defer, }; -static struct ata_port_operations artop6260_ops = { +static const struct ata_port_operations artop6260_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = artop6260_cable_detect, .set_piomode = artop6260_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_at32.c linux-2.6.38-ata/drivers/ata//pata_at32.c --- linux-2.6.38/drivers/ata//pata_at32.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_at32.c 2011-04-08 00:02:57.725880417 +0200 @@ -173,7 +173,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations at32_port_ops = { +static const struct ata_port_operations at32_port_ops = { .inherits = &ata_sff_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = pata_at32_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_at91.c linux-2.6.38-ata/drivers/ata//pata_at91.c --- linux-2.6.38/drivers/ata//pata_at91.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_at91.c 2011-04-08 00:02:57.725880417 +0200 @@ -196,7 +196,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations pata_at91_port_ops = { +static const struct ata_port_operations pata_at91_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = pata_at91_data_xfer_noirq, diff -Naur linux-2.6.38/drivers/ata//pata_atiixp.c linux-2.6.38-ata/drivers/ata//pata_atiixp.c --- linux-2.6.38/drivers/ata//pata_atiixp.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_atiixp.c 2011-04-08 00:02:57.725880417 +0200 @@ -214,7 +214,7 @@ .sg_tablesize = LIBATA_DUMB_MAX_PRD, }; -static struct ata_port_operations atiixp_port_ops = { +static const struct ata_port_operations atiixp_port_ops = { .inherits = &ata_bmdma_port_ops, .qc_prep = ata_bmdma_dumb_qc_prep, diff -Naur linux-2.6.38/drivers/ata//pata_atp867x.c linux-2.6.38-ata/drivers/ata//pata_atp867x.c --- linux-2.6.38/drivers/ata//pata_atp867x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_atp867x.c 2011-04-08 00:02:57.726880412 +0200 @@ -275,7 +275,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations atp867x_ops = { +static const struct ata_port_operations atp867x_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = atp867x_cable_detect, .set_piomode = atp867x_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_bf54x.c linux-2.6.38-ata/drivers/ata//pata_bf54x.c --- linux-2.6.38/drivers/ata//pata_bf54x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_bf54x.c 2011-04-08 00:02:57.726880412 +0200 @@ -1420,7 +1420,7 @@ .dma_boundary = ATA_DMA_BOUNDARY, }; -static struct ata_port_operations bfin_pata_ops = { +static const struct ata_port_operations bfin_pata_ops = { .inherits = &ata_bmdma_port_ops, .set_piomode = bfin_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_cmd640.c linux-2.6.38-ata/drivers/ata//pata_cmd640.c --- linux-2.6.38/drivers/ata//pata_cmd640.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cmd640.c 2011-04-08 00:02:57.742880321 +0200 @@ -176,7 +176,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations cmd640_port_ops = { +static const struct ata_port_operations cmd640_port_ops = { .inherits = &ata_sff_port_ops, /* In theory xfer_noirq is not needed once we kill the prefetcher */ .sff_data_xfer = ata_sff_data_xfer_noirq, diff -Naur linux-2.6.38/drivers/ata//pata_cmd64x.c linux-2.6.38-ata/drivers/ata//pata_cmd64x.c --- linux-2.6.38/drivers/ata//pata_cmd64x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cmd64x.c 2011-04-08 00:02:57.742880321 +0200 @@ -268,18 +268,18 @@ .set_dmamode = cmd64x_set_dmamode, }; -static struct ata_port_operations cmd64x_port_ops = { +static const struct ata_port_operations cmd64x_port_ops = { .inherits = &cmd64x_base_ops, .cable_detect = ata_cable_40wire, }; -static struct ata_port_operations cmd646r1_port_ops = { +static const struct ata_port_operations cmd646r1_port_ops = { .inherits = &cmd64x_base_ops, .bmdma_stop = cmd646r1_bmdma_stop, .cable_detect = ata_cable_40wire, }; -static struct ata_port_operations cmd648_port_ops = { +static const struct ata_port_operations cmd648_port_ops = { .inherits = &cmd64x_base_ops, .bmdma_stop = cmd648_bmdma_stop, .cable_detect = cmd648_cable_detect, diff -Naur linux-2.6.38/drivers/ata//pata_cs5520.c linux-2.6.38-ata/drivers/ata//pata_cs5520.c --- linux-2.6.38/drivers/ata//pata_cs5520.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cs5520.c 2011-04-08 00:02:57.742880321 +0200 @@ -108,7 +108,7 @@ .sg_tablesize = LIBATA_DUMB_MAX_PRD, }; -static struct ata_port_operations cs5520_port_ops = { +static const struct ata_port_operations cs5520_port_ops = { .inherits = &ata_bmdma_port_ops, .qc_prep = ata_bmdma_dumb_qc_prep, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_cs5530.c linux-2.6.38-ata/drivers/ata//pata_cs5530.c --- linux-2.6.38/drivers/ata//pata_cs5530.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cs5530.c 2011-04-08 00:02:57.742880321 +0200 @@ -164,7 +164,7 @@ .sg_tablesize = LIBATA_DUMB_MAX_PRD, }; -static struct ata_port_operations cs5530_port_ops = { +static const struct ata_port_operations cs5530_port_ops = { .inherits = &ata_bmdma_port_ops, .qc_prep = ata_bmdma_dumb_qc_prep, diff -Naur linux-2.6.38/drivers/ata//pata_cs5535.c linux-2.6.38-ata/drivers/ata//pata_cs5535.c --- linux-2.6.38/drivers/ata//pata_cs5535.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cs5535.c 2011-04-08 00:02:57.743880315 +0200 @@ -160,7 +160,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations cs5535_port_ops = { +static const struct ata_port_operations cs5535_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = cs5535_cable_detect, .set_piomode = cs5535_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_cs5536.c linux-2.6.38-ata/drivers/ata//pata_cs5536.c --- linux-2.6.38/drivers/ata//pata_cs5536.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cs5536.c 2011-04-08 00:02:57.743880315 +0200 @@ -233,7 +233,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations cs5536_port_ops = { +static const struct ata_port_operations cs5536_port_ops = { .inherits = &ata_bmdma32_port_ops, .cable_detect = cs5536_cable_detect, .set_piomode = cs5536_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_cypress.c linux-2.6.38-ata/drivers/ata//pata_cypress.c --- linux-2.6.38/drivers/ata//pata_cypress.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_cypress.c 2011-04-08 00:02:57.746880300 +0200 @@ -115,7 +115,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations cy82c693_port_ops = { +static const struct ata_port_operations cy82c693_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = cy82c693_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_efar.c linux-2.6.38-ata/drivers/ata//pata_efar.c --- linux-2.6.38/drivers/ata//pata_efar.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_efar.c 2011-04-08 00:02:57.746880300 +0200 @@ -238,7 +238,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations efar_ops = { +static const struct ata_port_operations efar_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = efar_cable_detect, .set_piomode = efar_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_hpt366.c linux-2.6.38-ata/drivers/ata//pata_hpt366.c --- linux-2.6.38/drivers/ata//pata_hpt366.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_hpt366.c 2011-04-08 00:02:57.746880300 +0200 @@ -275,7 +275,7 @@ * Configuration for HPT366/68 */ -static struct ata_port_operations hpt366_port_ops = { +static const struct ata_port_operations hpt366_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = hpt36x_cable_detect, .mode_filter = hpt366_filter, diff -Naur linux-2.6.38/drivers/ata//pata_hpt37x.c linux-2.6.38-ata/drivers/ata//pata_hpt37x.c --- linux-2.6.38/drivers/ata//pata_hpt37x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_hpt37x.c 2011-04-08 00:02:57.758880232 +0200 @@ -587,7 +587,7 @@ * Configuration for HPT370 */ -static struct ata_port_operations hpt370_port_ops = { +static const struct ata_port_operations hpt370_port_ops = { .inherits = &ata_bmdma_port_ops, .bmdma_stop = hpt370_bmdma_stop, @@ -603,7 +603,7 @@ * Configuration for HPT370A. Close to 370 but less filters */ -static struct ata_port_operations hpt370a_port_ops = { +static const struct ata_port_operations hpt370a_port_ops = { .inherits = &hpt370_port_ops, .mode_filter = hpt370a_filter, }; @@ -613,7 +613,7 @@ * mode setting functionality. */ -static struct ata_port_operations hpt302_port_ops = { +static const struct ata_port_operations hpt302_port_ops = { .inherits = &ata_bmdma_port_ops, .bmdma_stop = hpt37x_bmdma_stop, @@ -629,7 +629,7 @@ * but we have a mode filter. */ -static struct ata_port_operations hpt372_port_ops = { +static const struct ata_port_operations hpt372_port_ops = { .inherits = &hpt302_port_ops, .mode_filter = hpt372_filter, }; @@ -639,7 +639,7 @@ * but we have a different cable detection procedure for function 1. */ -static struct ata_port_operations hpt374_fn1_port_ops = { +static const struct ata_port_operations hpt374_fn1_port_ops = { .inherits = &hpt372_port_ops, .cable_detect = hpt374_fn1_cable_detect, }; diff -Naur linux-2.6.38/drivers/ata//pata_hpt3x2n.c linux-2.6.38-ata/drivers/ata//pata_hpt3x2n.c --- linux-2.6.38/drivers/ata//pata_hpt3x2n.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_hpt3x2n.c 2011-04-08 00:02:57.758880232 +0200 @@ -348,7 +348,7 @@ * Configuration for HPT302N/371N. */ -static struct ata_port_operations hpt3xxn_port_ops = { +static const struct ata_port_operations hpt3xxn_port_ops = { .inherits = &ata_bmdma_port_ops, .bmdma_stop = hpt3x2n_bmdma_stop, @@ -366,7 +366,7 @@ * Configuration for HPT372N. Same as 302N/371N but we have a mode filter. */ -static struct ata_port_operations hpt372n_port_ops = { +static const struct ata_port_operations hpt372n_port_ops = { .inherits = &hpt3xxn_port_ops, .mode_filter = &hpt372n_filter, }; diff -Naur linux-2.6.38/drivers/ata//pata_hpt3x3.c linux-2.6.38-ata/drivers/ata//pata_hpt3x3.c --- linux-2.6.38/drivers/ata//pata_hpt3x3.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_hpt3x3.c 2011-04-08 00:02:57.758880232 +0200 @@ -141,7 +141,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations hpt3x3_port_ops = { +static const struct ata_port_operations hpt3x3_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = hpt3x3_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_icside.c linux-2.6.38-ata/drivers/ata//pata_icside.c --- linux-2.6.38/drivers/ata//pata_icside.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_icside.c 2011-04-08 00:02:57.759880227 +0200 @@ -320,7 +320,7 @@ } } -static struct ata_port_operations pata_icside_port_ops = { +static const struct ata_port_operations pata_icside_port_ops = { .inherits = &ata_bmdma_port_ops, /* no need to build any PRD tables for DMA */ .qc_prep = ata_noop_qc_prep, diff -Naur linux-2.6.38/drivers/ata//pata_isapnp.c linux-2.6.38-ata/drivers/ata//pata_isapnp.c --- linux-2.6.38/drivers/ata//pata_isapnp.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_isapnp.c 2011-04-08 00:02:57.759880227 +0200 @@ -23,12 +23,12 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations isapnp_port_ops = { +static const struct ata_port_operations isapnp_port_ops = { .inherits = &ata_sff_port_ops, .cable_detect = ata_cable_40wire, }; -static struct ata_port_operations isapnp_noalt_port_ops = { +static const struct ata_port_operations isapnp_noalt_port_ops = { .inherits = &ata_sff_port_ops, .cable_detect = ata_cable_40wire, /* No altstatus so we don't want to use the lost interrupt poll */ diff -Naur linux-2.6.38/drivers/ata//pata_it8213.c linux-2.6.38-ata/drivers/ata//pata_it8213.c --- linux-2.6.38/drivers/ata//pata_it8213.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_it8213.c 2011-04-08 00:02:57.759880227 +0200 @@ -233,7 +233,7 @@ }; -static struct ata_port_operations it8213_ops = { +static const struct ata_port_operations it8213_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = it8213_cable_detect, .set_piomode = it8213_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_it821x.c linux-2.6.38-ata/drivers/ata//pata_it821x.c --- linux-2.6.38/drivers/ata//pata_it821x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_it821x.c 2011-04-08 00:02:57.760880222 +0200 @@ -801,7 +801,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations it821x_smart_port_ops = { +static const struct ata_port_operations it821x_smart_port_ops = { .inherits = &ata_bmdma_port_ops, .check_atapi_dma= it821x_check_atapi_dma, @@ -815,7 +815,7 @@ .port_start = it821x_port_start, }; -static struct ata_port_operations it821x_passthru_port_ops = { +static const struct ata_port_operations it821x_passthru_port_ops = { .inherits = &ata_bmdma_port_ops, .check_atapi_dma= it821x_check_atapi_dma, @@ -831,7 +831,7 @@ .port_start = it821x_port_start, }; -static struct ata_port_operations it821x_rdc_port_ops = { +static const struct ata_port_operations it821x_rdc_port_ops = { .inherits = &ata_bmdma_port_ops, .check_atapi_dma= it821x_check_atapi_dma, diff -Naur linux-2.6.38/drivers/ata//pata_ixp4xx_cf.c linux-2.6.38-ata/drivers/ata//pata_ixp4xx_cf.c --- linux-2.6.38/drivers/ata//pata_ixp4xx_cf.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_ixp4xx_cf.c 2011-04-08 00:02:57.760880222 +0200 @@ -89,7 +89,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations ixp4xx_port_ops = { +static const struct ata_port_operations ixp4xx_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = ixp4xx_mmio_data_xfer, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_jmicron.c linux-2.6.38-ata/drivers/ata//pata_jmicron.c --- linux-2.6.38/drivers/ata//pata_jmicron.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_jmicron.c 2011-04-08 00:02:57.760880222 +0200 @@ -111,7 +111,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations jmicron_ops = { +static const struct ata_port_operations jmicron_ops = { .inherits = &ata_bmdma_port_ops, .prereset = jmicron_pre_reset, }; diff -Naur linux-2.6.38/drivers/ata//pata_legacy.c linux-2.6.38-ata/drivers/ata//pata_legacy.c --- linux-2.6.38/drivers/ata//pata_legacy.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_legacy.c 2011-04-08 00:02:57.760880222 +0200 @@ -116,7 +116,7 @@ struct legacy_controller { const char *name; - struct ata_port_operations *ops; + const struct ata_port_operations *ops; unsigned int pio_mask; unsigned int flags; unsigned int pflags; @@ -239,12 +239,12 @@ * pio_mask as well. */ -static struct ata_port_operations simple_port_ops = { +static const struct ata_port_operations simple_port_ops = { .inherits = &legacy_base_port_ops, .sff_data_xfer = ata_sff_data_xfer_noirq, }; -static struct ata_port_operations legacy_port_ops = { +static const struct ata_port_operations legacy_port_ops = { .inherits = &legacy_base_port_ops, .sff_data_xfer = ata_sff_data_xfer_noirq, .set_mode = legacy_set_mode, @@ -340,7 +340,7 @@ return buflen; } -static struct ata_port_operations pdc20230_port_ops = { +static const struct ata_port_operations pdc20230_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = pdc20230_set_piomode, .sff_data_xfer = pdc_data_xfer_vlb, @@ -373,7 +373,7 @@ ioread8(ap->ioaddr.status_addr); } -static struct ata_port_operations ht6560a_port_ops = { +static const struct ata_port_operations ht6560a_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = ht6560a_set_piomode, }; @@ -416,7 +416,7 @@ ioread8(ap->ioaddr.status_addr); } -static struct ata_port_operations ht6560b_port_ops = { +static const struct ata_port_operations ht6560b_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = ht6560b_set_piomode, }; @@ -515,7 +515,7 @@ } -static struct ata_port_operations opti82c611a_port_ops = { +static const struct ata_port_operations opti82c611a_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = opti82c611a_set_piomode, }; @@ -625,7 +625,7 @@ return ata_sff_qc_issue(qc); } -static struct ata_port_operations opti82c46x_port_ops = { +static const struct ata_port_operations opti82c46x_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = opti82c46x_set_piomode, .qc_issue = opti82c46x_qc_issue, @@ -787,20 +787,20 @@ return 0; } -static struct ata_port_operations qdi6500_port_ops = { +static const struct ata_port_operations qdi6500_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = qdi6500_set_piomode, .qc_issue = qdi_qc_issue, .sff_data_xfer = vlb32_data_xfer, }; -static struct ata_port_operations qdi6580_port_ops = { +static const struct ata_port_operations qdi6580_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = qdi6580_set_piomode, .sff_data_xfer = vlb32_data_xfer, }; -static struct ata_port_operations qdi6580dp_port_ops = { +static const struct ata_port_operations qdi6580dp_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = qdi6580dp_set_piomode, .qc_issue = qdi_qc_issue, @@ -872,7 +872,7 @@ return 0; } -static struct ata_port_operations winbond_port_ops = { +static const struct ata_port_operations winbond_port_ops = { .inherits = &legacy_base_port_ops, .set_piomode = winbond_set_piomode, .sff_data_xfer = vlb32_data_xfer, @@ -995,7 +995,7 @@ int pio_modes = controller->pio_mask; unsigned long io = probe->port; u32 mask = (1 << probe->slot); - struct ata_port_operations *ops = controller->ops; + const struct ata_port_operations *ops = controller->ops; struct legacy_data *ld = &legacy_data[probe->slot]; struct ata_host *host = NULL; struct ata_port *ap; diff -Naur linux-2.6.38/drivers/ata//pata_macio.c linux-2.6.38-ata/drivers/ata//pata_macio.c --- linux-2.6.38/drivers/ata//pata_macio.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_macio.c 2011-04-08 00:02:57.761880216 +0200 @@ -918,9 +918,8 @@ .slave_configure = pata_macio_slave_config, }; -static struct ata_port_operations pata_macio_ops = { +static const struct ata_port_operations pata_macio_ops = { .inherits = &ata_bmdma_port_ops, - .freeze = pata_macio_freeze, .set_piomode = pata_macio_set_timings, .set_dmamode = pata_macio_set_timings, diff -Naur linux-2.6.38/drivers/ata//pata_marvell.c linux-2.6.38-ata/drivers/ata//pata_marvell.c --- linux-2.6.38/drivers/ata//pata_marvell.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_marvell.c 2011-04-08 00:02:57.761880216 +0200 @@ -100,7 +100,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations marvell_ops = { +static const struct ata_port_operations marvell_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = marvell_cable_detect, .prereset = marvell_pre_reset, diff -Naur linux-2.6.38/drivers/ata//pata_mpc52xx.c linux-2.6.38-ata/drivers/ata//pata_mpc52xx.c --- linux-2.6.38/drivers/ata//pata_mpc52xx.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_mpc52xx.c 2011-04-08 00:02:57.762880210 +0200 @@ -609,7 +609,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations mpc52xx_ata_port_ops = { +static const struct ata_port_operations mpc52xx_ata_port_ops = { .inherits = &ata_bmdma_port_ops, .sff_dev_select = mpc52xx_ata_dev_select, .set_piomode = mpc52xx_ata_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_mpiix.c linux-2.6.38-ata/drivers/ata//pata_mpiix.c --- linux-2.6.38/drivers/ata//pata_mpiix.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_mpiix.c 2011-04-08 00:02:57.762880210 +0200 @@ -140,7 +140,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations mpiix_port_ops = { +static const struct ata_port_operations mpiix_port_ops = { .inherits = &ata_sff_port_ops, .qc_issue = mpiix_qc_issue, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_netcell.c linux-2.6.38-ata/drivers/ata//pata_netcell.c --- linux-2.6.38/drivers/ata//pata_netcell.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_netcell.c 2011-04-08 00:02:57.762880210 +0200 @@ -34,7 +34,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations netcell_ops = { +static const struct ata_port_operations netcell_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_80wire, .read_id = netcell_read_id, diff -Naur linux-2.6.38/drivers/ata//pata_ninja32.c linux-2.6.38-ata/drivers/ata//pata_ninja32.c --- linux-2.6.38/drivers/ata//pata_ninja32.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_ninja32.c 2011-04-08 00:02:57.762880210 +0200 @@ -81,7 +81,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations ninja32_port_ops = { +static const struct ata_port_operations ninja32_port_ops = { .inherits = &ata_bmdma_port_ops, .sff_dev_select = ninja32_dev_select, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_ns87410.c linux-2.6.38-ata/drivers/ata//pata_ns87410.c --- linux-2.6.38/drivers/ata//pata_ns87410.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_ns87410.c 2011-04-08 00:02:57.762880210 +0200 @@ -132,7 +132,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations ns87410_port_ops = { +static const struct ata_port_operations ns87410_port_ops = { .inherits = &ata_sff_port_ops, .qc_issue = ns87410_qc_issue, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_ns87415.c linux-2.6.38-ata/drivers/ata//pata_ns87415.c --- linux-2.6.38/drivers/ata//pata_ns87415.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_ns87415.c 2011-04-08 00:02:57.762880210 +0200 @@ -299,7 +299,7 @@ } #endif /* 87560 SuperIO Support */ -static struct ata_port_operations ns87415_pata_ops = { +static const struct ata_port_operations ns87415_pata_ops = { .inherits = &ata_bmdma_port_ops, .check_atapi_dma = ns87415_check_atapi_dma, @@ -313,7 +313,7 @@ }; #if defined(CONFIG_SUPERIO) -static struct ata_port_operations ns87560_pata_ops = { +static const struct ata_port_operations ns87560_pata_ops = { .inherits = &ns87415_pata_ops, .sff_tf_read = ns87560_tf_read, .sff_check_status = ns87560_check_status, diff -Naur linux-2.6.38/drivers/ata//pata_octeon_cf.c linux-2.6.38-ata/drivers/ata//pata_octeon_cf.c --- linux-2.6.38/drivers/ata//pata_octeon_cf.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_octeon_cf.c 2011-04-08 00:02:57.763880204 +0200 @@ -780,7 +780,7 @@ return 0; } -static struct ata_port_operations octeon_cf_ops = { +static struct ata_port_operations octeon_cf_ops = { /* cannot be const */ .inherits = &ata_sff_port_ops, .check_atapi_dma = octeon_cf_check_atapi_dma, .qc_prep = ata_noop_qc_prep, diff -Naur linux-2.6.38/drivers/ata//pata_oldpiix.c linux-2.6.38-ata/drivers/ata//pata_oldpiix.c --- linux-2.6.38/drivers/ata//pata_oldpiix.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_oldpiix.c 2011-04-08 00:02:57.763880204 +0200 @@ -208,7 +208,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations oldpiix_pata_ops = { +static const struct ata_port_operations oldpiix_pata_ops = { .inherits = &ata_bmdma_port_ops, .qc_issue = oldpiix_qc_issue, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_opti.c linux-2.6.38-ata/drivers/ata//pata_opti.c --- linux-2.6.38/drivers/ata//pata_opti.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_opti.c 2011-04-08 00:02:57.769880170 +0200 @@ -152,7 +152,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations opti_port_ops = { +static const struct ata_port_operations opti_port_ops = { .inherits = &ata_sff_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = opti_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_optidma.c linux-2.6.38-ata/drivers/ata//pata_optidma.c --- linux-2.6.38/drivers/ata//pata_optidma.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_optidma.c 2011-04-08 00:02:57.772880154 +0200 @@ -337,7 +337,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations optidma_port_ops = { +static const struct ata_port_operations optidma_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_40wire, .set_piomode = optidma_set_pio_mode, @@ -346,7 +346,7 @@ .prereset = optidma_pre_reset, }; -static struct ata_port_operations optiplus_port_ops = { +static const struct ata_port_operations optiplus_port_ops = { .inherits = &optidma_port_ops, .set_piomode = optiplus_set_pio_mode, .set_dmamode = optiplus_set_dma_mode, diff -Naur linux-2.6.38/drivers/ata//pata_palmld.c linux-2.6.38-ata/drivers/ata//pata_palmld.c --- linux-2.6.38/drivers/ata//pata_palmld.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_palmld.c 2011-04-08 00:02:57.773880148 +0200 @@ -37,7 +37,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations palmld_port_ops = { +static const struct ata_port_operations palmld_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = ata_sff_data_xfer_noirq, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_pcmcia.c linux-2.6.38-ata/drivers/ata//pata_pcmcia.c --- linux-2.6.38/drivers/ata//pata_pcmcia.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_pcmcia.c 2011-04-08 00:02:57.773880148 +0200 @@ -151,14 +151,14 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations pcmcia_port_ops = { +static const struct ata_port_operations pcmcia_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = ata_sff_data_xfer_noirq, .cable_detect = ata_cable_40wire, .set_mode = pcmcia_set_mode, }; -static struct ata_port_operations pcmcia_8bit_port_ops = { +static const struct ata_port_operations pcmcia_8bit_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = ata_data_xfer_8bit, .cable_detect = ata_cable_40wire, @@ -205,7 +205,7 @@ unsigned long io_base, ctl_base; void __iomem *io_addr, *ctl_addr; int n_ports = 1; - struct ata_port_operations *ops = &pcmcia_port_ops; + const struct ata_port_operations *ops = &pcmcia_port_ops; /* Set up attributes in order to probe card and get resources */ pdev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO | diff -Naur linux-2.6.38/drivers/ata//pata_pdc2027x.c linux-2.6.38-ata/drivers/ata//pata_pdc2027x.c --- linux-2.6.38/drivers/ata//pata_pdc2027x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_pdc2027x.c 2011-04-08 00:02:57.779880112 +0200 @@ -132,14 +132,14 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations pdc2027x_pata100_ops = { +static const struct ata_port_operations pdc2027x_pata100_ops = { .inherits = &ata_bmdma_port_ops, .check_atapi_dma = pdc2027x_check_atapi_dma, .cable_detect = pdc2027x_cable_detect, .prereset = pdc2027x_prereset, }; -static struct ata_port_operations pdc2027x_pata133_ops = { +static const struct ata_port_operations pdc2027x_pata133_ops = { .inherits = &pdc2027x_pata100_ops, .mode_filter = pdc2027x_mode_filter, .set_piomode = pdc2027x_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_pdc202xx_old.c linux-2.6.38-ata/drivers/ata//pata_pdc202xx_old.c --- linux-2.6.38/drivers/ata//pata_pdc202xx_old.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_pdc202xx_old.c 2011-04-08 00:02:57.780880107 +0200 @@ -295,7 +295,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations pdc2024x_port_ops = { +static const struct ata_port_operations pdc2024x_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_40wire, @@ -306,7 +306,7 @@ .sff_irq_check = pdc202xx_irq_check, }; -static struct ata_port_operations pdc2026x_port_ops = { +static const struct ata_port_operations pdc2026x_port_ops = { .inherits = &pdc2024x_port_ops, .check_atapi_dma = pdc2026x_check_atapi_dma, diff -Naur linux-2.6.38/drivers/ata//pata_piccolo.c linux-2.6.38-ata/drivers/ata//pata_piccolo.c --- linux-2.6.38/drivers/ata//pata_piccolo.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_piccolo.c 2011-04-08 00:02:57.780880107 +0200 @@ -67,7 +67,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations tosh_port_ops = { +static const struct ata_port_operations tosh_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_unknown, .set_piomode = tosh_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_platform.c linux-2.6.38-ata/drivers/ata//pata_platform.c --- linux-2.6.38/drivers/ata//pata_platform.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_platform.c 2011-04-08 00:02:57.781880102 +0200 @@ -48,7 +48,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations pata_platform_port_ops = { +static const struct ata_port_operations pata_platform_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = ata_sff_data_xfer_noirq, .cable_detect = ata_cable_unknown, diff -Naur linux-2.6.38/drivers/ata//pata_pxa.c linux-2.6.38-ata/drivers/ata//pata_pxa.c --- linux-2.6.38/drivers/ata//pata_pxa.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_pxa.c 2011-04-08 00:02:57.782880097 +0200 @@ -198,7 +198,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations pxa_ata_port_ops = { +static const struct ata_port_operations pxa_ata_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_40wire, diff -Naur linux-2.6.38/drivers/ata//pata_qdi.c linux-2.6.38-ata/drivers/ata//pata_qdi.c --- linux-2.6.38/drivers/ata//pata_qdi.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_qdi.c 2011-04-08 00:02:57.784880087 +0200 @@ -157,7 +157,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations qdi6500_port_ops = { +static const struct ata_port_operations qdi6500_port_ops = { .inherits = &ata_sff_port_ops, .qc_issue = qdi_qc_issue, .sff_data_xfer = qdi_data_xfer, @@ -165,7 +165,7 @@ .set_piomode = qdi6500_set_piomode, }; -static struct ata_port_operations qdi6580_port_ops = { +static const struct ata_port_operations qdi6580_port_ops = { .inherits = &qdi6500_port_ops, .set_piomode = qdi6580_set_piomode, }; diff -Naur linux-2.6.38/drivers/ata//pata_radisys.c linux-2.6.38-ata/drivers/ata//pata_radisys.c --- linux-2.6.38/drivers/ata//pata_radisys.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_radisys.c 2011-04-08 00:02:57.785880081 +0200 @@ -187,7 +187,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations radisys_pata_ops = { +static const struct ata_port_operations radisys_pata_ops = { .inherits = &ata_bmdma_port_ops, .qc_issue = radisys_qc_issue, .cable_detect = ata_cable_unknown, diff -Naur linux-2.6.38/drivers/ata//pata_rb532_cf.c linux-2.6.38-ata/drivers/ata//pata_rb532_cf.c --- linux-2.6.38/drivers/ata//pata_rb532_cf.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_rb532_cf.c 2011-04-08 00:02:57.795880024 +0200 @@ -69,7 +69,7 @@ return IRQ_HANDLED; } -static struct ata_port_operations rb532_pata_port_ops = { +static const struct ata_port_operations rb532_pata_port_ops = { .inherits = &ata_sff_port_ops, .sff_data_xfer = ata_sff_data_xfer32, }; diff -Naur linux-2.6.38/drivers/ata//pata_rdc.c linux-2.6.38-ata/drivers/ata//pata_rdc.c --- linux-2.6.38/drivers/ata//pata_rdc.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_rdc.c 2011-04-08 00:02:57.796880019 +0200 @@ -273,7 +273,7 @@ pci_write_config_byte(dev, 0x48, udma_enable); } -static struct ata_port_operations rdc_pata_ops = { +static const struct ata_port_operations rdc_pata_ops = { .inherits = &ata_bmdma32_port_ops, .cable_detect = rdc_pata_cable_detect, .set_piomode = rdc_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_rz1000.c linux-2.6.38-ata/drivers/ata//pata_rz1000.c --- linux-2.6.38/drivers/ata//pata_rz1000.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_rz1000.c 2011-04-08 00:02:57.796880019 +0200 @@ -54,7 +54,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations rz1000_port_ops = { +static const struct ata_port_operations rz1000_port_ops = { .inherits = &ata_sff_port_ops, .cable_detect = ata_cable_40wire, .set_mode = rz1000_set_mode, diff -Naur linux-2.6.38/drivers/ata//pata_samsung_cf.c linux-2.6.38-ata/drivers/ata//pata_samsung_cf.c --- linux-2.6.38/drivers/ata//pata_samsung_cf.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_samsung_cf.c 2011-04-08 00:02:57.796880019 +0200 @@ -399,7 +399,7 @@ ATA_PIO_SHT(DRV_NAME), }; -static struct ata_port_operations pata_s3c_port_ops = { +static const struct ata_port_operations pata_s3c_port_ops = { .inherits = &ata_sff_port_ops, .sff_check_status = pata_s3c_check_status, .sff_check_altstatus = pata_s3c_check_altstatus, @@ -413,7 +413,7 @@ .set_piomode = pata_s3c_set_piomode, }; -static struct ata_port_operations pata_s5p_port_ops = { +static const struct ata_port_operations pata_s5p_port_ops = { .inherits = &ata_sff_port_ops, .set_piomode = pata_s3c_set_piomode, }; diff -Naur linux-2.6.38/drivers/ata//pata_sc1200.c linux-2.6.38-ata/drivers/ata//pata_sc1200.c --- linux-2.6.38/drivers/ata//pata_sc1200.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_sc1200.c 2011-04-08 00:02:57.797880013 +0200 @@ -207,7 +207,7 @@ .sg_tablesize = LIBATA_DUMB_MAX_PRD, }; -static struct ata_port_operations sc1200_port_ops = { +static const struct ata_port_operations sc1200_port_ops = { .inherits = &ata_bmdma_port_ops, .qc_prep = ata_bmdma_dumb_qc_prep, .qc_issue = sc1200_qc_issue, diff -Naur linux-2.6.38/drivers/ata//pata_scc.c linux-2.6.38-ata/drivers/ata//pata_scc.c --- linux-2.6.38/drivers/ata//pata_scc.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_scc.c 2011-04-08 00:02:57.797880013 +0200 @@ -926,7 +926,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations scc_pata_ops = { +static const struct ata_port_operations scc_pata_ops = { .inherits = &ata_bmdma_port_ops, .set_piomode = scc_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_sch.c linux-2.6.38-ata/drivers/ata//pata_sch.c --- linux-2.6.38/drivers/ata//pata_sch.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_sch.c 2011-04-08 00:02:57.803879977 +0200 @@ -75,7 +75,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations sch_pata_ops = { +static const struct ata_port_operations sch_pata_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = ata_cable_unknown, .set_piomode = sch_set_piomode, diff -Naur linux-2.6.38/drivers/ata//pata_serverworks.c linux-2.6.38-ata/drivers/ata//pata_serverworks.c --- linux-2.6.38/drivers/ata//pata_serverworks.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_serverworks.c 2011-04-08 00:02:57.803879977 +0200 @@ -300,7 +300,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations serverworks_osb4_port_ops = { +static const struct ata_port_operations serverworks_osb4_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = serverworks_cable_detect, .mode_filter = serverworks_osb4_filter, @@ -308,7 +308,7 @@ .set_dmamode = serverworks_set_dmamode, }; -static struct ata_port_operations serverworks_csb_port_ops = { +static const struct ata_port_operations serverworks_csb_port_ops = { .inherits = &serverworks_osb4_port_ops, .mode_filter = serverworks_csb_filter, }; diff -Naur linux-2.6.38/drivers/ata//pata_sil680.c linux-2.6.38-ata/drivers/ata//pata_sil680.c --- linux-2.6.38/drivers/ata//pata_sil680.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_sil680.c 2011-04-08 00:02:57.803879977 +0200 @@ -225,8 +225,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; - -static struct ata_port_operations sil680_port_ops = { +static const struct ata_port_operations sil680_port_ops = { .inherits = &ata_bmdma32_port_ops, .sff_exec_command = sil680_sff_exec_command, .sff_irq_check = sil680_sff_irq_check, diff -Naur linux-2.6.38/drivers/ata//pata_sis.c linux-2.6.38-ata/drivers/ata//pata_sis.c --- linux-2.6.38/drivers/ata//pata_sis.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_sis.c 2011-04-08 00:02:57.804879971 +0200 @@ -503,47 +503,47 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations sis_133_for_sata_ops = { +static const struct ata_port_operations sis_133_for_sata_ops = { .inherits = &ata_bmdma_port_ops, .set_piomode = sis_133_set_piomode, .set_dmamode = sis_133_set_dmamode, .cable_detect = sis_133_cable_detect, }; -static struct ata_port_operations sis_base_ops = { +static const struct ata_port_operations sis_base_ops = { .inherits = &ata_bmdma_port_ops, .prereset = sis_pre_reset, }; -static struct ata_port_operations sis_133_ops = { +static const struct ata_port_operations sis_133_ops = { .inherits = &sis_base_ops, .set_piomode = sis_133_set_piomode, .set_dmamode = sis_133_set_dmamode, .cable_detect = sis_133_cable_detect, }; -static struct ata_port_operations sis_133_early_ops = { +static const struct ata_port_operations sis_133_early_ops = { .inherits = &sis_base_ops, .set_piomode = sis_100_set_piomode, .set_dmamode = sis_133_early_set_dmamode, .cable_detect = sis_66_cable_detect, }; -static struct ata_port_operations sis_100_ops = { +static const struct ata_port_operations sis_100_ops = { .inherits = &sis_base_ops, .set_piomode = sis_100_set_piomode, .set_dmamode = sis_100_set_dmamode, .cable_detect = sis_66_cable_detect, }; -static struct ata_port_operations sis_66_ops = { +static const struct ata_port_operations sis_66_ops = { .inherits = &sis_base_ops, .set_piomode = sis_old_set_piomode, .set_dmamode = sis_66_set_dmamode, .cable_detect = sis_66_cable_detect, }; -static struct ata_port_operations sis_old_ops = { +static const struct ata_port_operations sis_old_ops = { .inherits = &sis_base_ops, .set_piomode = sis_old_set_piomode, .set_dmamode = sis_old_set_dmamode, diff -Naur linux-2.6.38/drivers/ata//pata_sl82c105.c linux-2.6.38-ata/drivers/ata//pata_sl82c105.c --- linux-2.6.38/drivers/ata//pata_sl82c105.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_sl82c105.c 2011-04-08 00:02:57.804879971 +0200 @@ -241,7 +241,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations sl82c105_port_ops = { +static const struct ata_port_operations sl82c105_port_ops = { .inherits = &ata_bmdma_port_ops, .qc_defer = sl82c105_qc_defer, .bmdma_start = sl82c105_bmdma_start, diff -Naur linux-2.6.38/drivers/ata//pata_triflex.c linux-2.6.38-ata/drivers/ata//pata_triflex.c --- linux-2.6.38/drivers/ata//pata_triflex.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_triflex.c 2011-04-08 00:02:57.804879971 +0200 @@ -178,7 +178,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations triflex_port_ops = { +static const struct ata_port_operations triflex_port_ops = { .inherits = &ata_bmdma_port_ops, .bmdma_start = triflex_bmdma_start, .bmdma_stop = triflex_bmdma_stop, diff -Naur linux-2.6.38/drivers/ata//pata_via.c linux-2.6.38-ata/drivers/ata//pata_via.c --- linux-2.6.38/drivers/ata//pata_via.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pata_via.c 2011-04-08 00:02:57.804879971 +0200 @@ -441,7 +441,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations via_port_ops = { +static const struct ata_port_operations via_port_ops = { .inherits = &ata_bmdma_port_ops, .cable_detect = via_cable_detect, .set_piomode = via_set_piomode, @@ -452,7 +452,7 @@ .mode_filter = via_mode_filter, }; -static struct ata_port_operations via_port_ops_noirq = { +static const struct ata_port_operations via_port_ops_noirq = { .inherits = &via_port_ops, .sff_data_xfer = ata_sff_data_xfer_noirq, }; diff -Naur linux-2.6.38/drivers/ata//pdc_adma.c linux-2.6.38-ata/drivers/ata//pdc_adma.c --- linux-2.6.38/drivers/ata//pdc_adma.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//pdc_adma.c 2011-04-08 00:02:57.804879971 +0200 @@ -146,7 +146,7 @@ .dma_boundary = ADMA_DMA_BOUNDARY, }; -static struct ata_port_operations adma_ata_ops = { +static const struct ata_port_operations adma_ata_ops = { .inherits = &ata_sff_port_ops, .lost_interrupt = ATA_OP_NULL, diff -Naur linux-2.6.38/drivers/ata//sata_dwc_460ex.c linux-2.6.38-ata/drivers/ata//sata_dwc_460ex.c --- linux-2.6.38/drivers/ata//sata_dwc_460ex.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_dwc_460ex.c 2011-04-08 00:02:57.805879966 +0200 @@ -1560,7 +1560,7 @@ .dma_boundary = ATA_DMA_BOUNDARY, }; -static struct ata_port_operations sata_dwc_ops = { +static const struct ata_port_operations sata_dwc_ops = { .inherits = &ata_sff_port_ops, .error_handler = sata_dwc_error_handler, diff -Naur linux-2.6.38/drivers/ata//sata_fsl.c linux-2.6.38-ata/drivers/ata//sata_fsl.c --- linux-2.6.38/drivers/ata//sata_fsl.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_fsl.c 2011-04-08 00:02:57.817879898 +0200 @@ -1258,7 +1258,7 @@ .dma_boundary = ATA_DMA_BOUNDARY, }; -static struct ata_port_operations sata_fsl_ops = { +static const struct ata_port_operations sata_fsl_ops = { .inherits = &sata_pmp_port_ops, .qc_defer = ata_std_qc_defer, diff -Naur linux-2.6.38/drivers/ata//sata_inic162x.c linux-2.6.38-ata/drivers/ata//sata_inic162x.c --- linux-2.6.38/drivers/ata//sata_inic162x.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_inic162x.c 2011-04-08 00:02:57.817879898 +0200 @@ -705,7 +705,7 @@ return 0; } -static struct ata_port_operations inic_port_ops = { +static const struct ata_port_operations inic_port_ops = { .inherits = &sata_port_ops, .check_atapi_dma = inic_check_atapi_dma, diff -Naur linux-2.6.38/drivers/ata//sata_mv.c linux-2.6.38-ata/drivers/ata//sata_mv.c --- linux-2.6.38/drivers/ata//sata_mv.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_mv.c 2011-04-08 00:02:57.827879843 +0200 @@ -663,7 +663,7 @@ .dma_boundary = MV_DMA_BOUNDARY, }; -static struct ata_port_operations mv5_ops = { +static const struct ata_port_operations mv5_ops = { .inherits = &ata_sff_port_ops, .lost_interrupt = ATA_OP_NULL, @@ -683,7 +683,7 @@ .port_stop = mv_port_stop, }; -static struct ata_port_operations mv6_ops = { +static const struct ata_port_operations mv6_ops = { .inherits = &ata_bmdma_port_ops, .lost_interrupt = ATA_OP_NULL, @@ -717,7 +717,7 @@ .port_stop = mv_port_stop, }; -static struct ata_port_operations mv_iie_ops = { +static const struct ata_port_operations mv_iie_ops = { .inherits = &mv6_ops, .dev_config = ATA_OP_NULL, .qc_prep = mv_qc_prep_iie, diff -Naur linux-2.6.38/drivers/ata//sata_nv.c linux-2.6.38-ata/drivers/ata//sata_nv.c --- linux-2.6.38/drivers/ata//sata_nv.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_nv.c 2011-04-08 00:02:57.828879837 +0200 @@ -465,7 +465,7 @@ * cases. Define nv_hardreset() which only kicks in for post-boot * probing and use it for all variants. */ -static struct ata_port_operations nv_generic_ops = { +static const struct ata_port_operations nv_generic_ops = { .inherits = &ata_bmdma_port_ops, .lost_interrupt = ATA_OP_NULL, .scr_read = nv_scr_read, @@ -473,20 +473,20 @@ .hardreset = nv_hardreset, }; -static struct ata_port_operations nv_nf2_ops = { +static const struct ata_port_operations nv_nf2_ops = { .inherits = &nv_generic_ops, .freeze = nv_nf2_freeze, .thaw = nv_nf2_thaw, }; -static struct ata_port_operations nv_ck804_ops = { +static const struct ata_port_operations nv_ck804_ops = { .inherits = &nv_generic_ops, .freeze = nv_ck804_freeze, .thaw = nv_ck804_thaw, .host_stop = nv_ck804_host_stop, }; -static struct ata_port_operations nv_adma_ops = { +static const struct ata_port_operations nv_adma_ops = { .inherits = &nv_ck804_ops, .check_atapi_dma = nv_adma_check_atapi_dma, @@ -510,7 +510,7 @@ .host_stop = nv_adma_host_stop, }; -static struct ata_port_operations nv_swncq_ops = { +static const struct ata_port_operations nv_swncq_ops = { .inherits = &nv_generic_ops, .qc_defer = ata_std_qc_defer, diff -Naur linux-2.6.38/drivers/ata//sata_promise.c linux-2.6.38-ata/drivers/ata//sata_promise.c --- linux-2.6.38/drivers/ata//sata_promise.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_promise.c 2011-04-08 00:02:57.834879804 +0200 @@ -196,7 +196,7 @@ .error_handler = pdc_error_handler, }; -static struct ata_port_operations pdc_sata_ops = { +static const struct ata_port_operations pdc_sata_ops = { .inherits = &pdc_common_ops, .cable_detect = pdc_sata_cable_detect, .freeze = pdc_sata_freeze, @@ -209,14 +209,14 @@ /* First-generation chips need a more restrictive ->check_atapi_dma op, and ->freeze/thaw that ignore the hotplug controls. */ -static struct ata_port_operations pdc_old_sata_ops = { +static const struct ata_port_operations pdc_old_sata_ops = { .inherits = &pdc_sata_ops, .freeze = pdc_freeze, .thaw = pdc_thaw, .check_atapi_dma = pdc_old_sata_check_atapi_dma, }; -static struct ata_port_operations pdc_pata_ops = { +static const struct ata_port_operations pdc_pata_ops = { .inherits = &pdc_common_ops, .cable_detect = pdc_pata_cable_detect, .freeze = pdc_freeze, diff -Naur linux-2.6.38/drivers/ata//sata_qstor.c linux-2.6.38-ata/drivers/ata//sata_qstor.c --- linux-2.6.38/drivers/ata//sata_qstor.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_qstor.c 2011-04-08 00:02:57.835879799 +0200 @@ -131,7 +131,7 @@ .dma_boundary = QS_DMA_BOUNDARY, }; -static struct ata_port_operations qs_ata_ops = { +static const struct ata_port_operations qs_ata_ops = { .inherits = &ata_sff_port_ops, .check_atapi_dma = qs_check_atapi_dma, diff -Naur linux-2.6.38/drivers/ata//sata_sil24.c linux-2.6.38-ata/drivers/ata//sata_sil24.c --- linux-2.6.38/drivers/ata//sata_sil24.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_sil24.c 2011-04-08 00:02:57.836879793 +0200 @@ -389,7 +389,7 @@ .dma_boundary = ATA_DMA_BOUNDARY, }; -static struct ata_port_operations sil24_ops = { +static const struct ata_port_operations sil24_ops = { .inherits = &sata_pmp_port_ops, .qc_defer = sil24_qc_defer, diff -Naur linux-2.6.38/drivers/ata//sata_sil.c linux-2.6.38-ata/drivers/ata//sata_sil.c --- linux-2.6.38/drivers/ata//sata_sil.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_sil.c 2011-04-08 00:02:57.837879787 +0200 @@ -182,7 +182,7 @@ .sg_tablesize = ATA_MAX_PRD }; -static struct ata_port_operations sil_ops = { +static const struct ata_port_operations sil_ops = { .inherits = &ata_bmdma32_port_ops, .dev_config = sil_dev_config, .set_mode = sil_set_mode, diff -Naur linux-2.6.38/drivers/ata//sata_sis.c linux-2.6.38-ata/drivers/ata//sata_sis.c --- linux-2.6.38/drivers/ata//sata_sis.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_sis.c 2011-04-08 00:02:57.837879787 +0200 @@ -89,7 +89,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations sis_ops = { +static const struct ata_port_operations sis_ops = { .inherits = &ata_bmdma_port_ops, .scr_read = sis_scr_read, .scr_write = sis_scr_write, diff -Naur linux-2.6.38/drivers/ata//sata_svw.c linux-2.6.38-ata/drivers/ata//sata_svw.c --- linux-2.6.38/drivers/ata//sata_svw.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_svw.c 2011-04-08 00:02:57.838879781 +0200 @@ -344,7 +344,7 @@ }; -static struct ata_port_operations k2_sata_ops = { +static const struct ata_port_operations k2_sata_ops = { .inherits = &ata_bmdma_port_ops, .sff_tf_load = k2_sata_tf_load, .sff_tf_read = k2_sata_tf_read, diff -Naur linux-2.6.38/drivers/ata//sata_sx4.c linux-2.6.38-ata/drivers/ata//sata_sx4.c --- linux-2.6.38/drivers/ata//sata_sx4.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_sx4.c 2011-04-08 00:02:57.838879781 +0200 @@ -249,7 +249,7 @@ }; /* TODO: inherit from base port_ops after converting to new EH */ -static struct ata_port_operations pdc_20621_ops = { +static const struct ata_port_operations pdc_20621_ops = { .inherits = &ata_sff_port_ops, .check_atapi_dma = pdc_check_atapi_dma, diff -Naur linux-2.6.38/drivers/ata//sata_uli.c linux-2.6.38-ata/drivers/ata//sata_uli.c --- linux-2.6.38/drivers/ata//sata_uli.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_uli.c 2011-04-08 00:02:57.839879775 +0200 @@ -80,7 +80,7 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations uli_ops = { +static const struct ata_port_operations uli_ops = { .inherits = &ata_bmdma_port_ops, .scr_read = uli_scr_read, .scr_write = uli_scr_write, diff -Naur linux-2.6.38/drivers/ata//sata_via.c linux-2.6.38-ata/drivers/ata//sata_via.c --- linux-2.6.38/drivers/ata//sata_via.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_via.c 2011-04-08 00:02:57.842879757 +0200 @@ -115,32 +115,32 @@ ATA_BMDMA_SHT(DRV_NAME), }; -static struct ata_port_operations svia_base_ops = { +static const struct ata_port_operations svia_base_ops = { .inherits = &ata_bmdma_port_ops, .sff_tf_load = svia_tf_load, }; -static struct ata_port_operations vt6420_sata_ops = { +static const struct ata_port_operations vt6420_sata_ops = { .inherits = &svia_base_ops, .freeze = svia_noop_freeze, .prereset = vt6420_prereset, .bmdma_start = vt6420_bmdma_start, }; -static struct ata_port_operations vt6421_pata_ops = { +static const struct ata_port_operations vt6421_pata_ops = { .inherits = &svia_base_ops, .cable_detect = vt6421_pata_cable_detect, .set_piomode = vt6421_set_pio_mode, .set_dmamode = vt6421_set_dma_mode, }; -static struct ata_port_operations vt6421_sata_ops = { +static const struct ata_port_operations vt6421_sata_ops = { .inherits = &svia_base_ops, .scr_read = svia_scr_read, .scr_write = svia_scr_write, }; -static struct ata_port_operations vt8251_ops = { +static const struct ata_port_operations vt8251_ops = { .inherits = &svia_base_ops, .hardreset = sata_std_hardreset, .scr_read = vt8251_scr_read, diff -Naur linux-2.6.38/drivers/ata//sata_vsc.c linux-2.6.38-ata/drivers/ata//sata_vsc.c --- linux-2.6.38/drivers/ata//sata_vsc.c 2011-03-15 02:20:32.000000000 +0100 +++ linux-2.6.38-ata/drivers/ata//sata_vsc.c 2011-04-08 00:02:57.843879751 +0200 @@ -300,7 +300,7 @@ }; -static struct ata_port_operations vsc_sata_ops = { +static const struct ata_port_operations vsc_sata_ops = { .inherits = &ata_bmdma_port_ops, /* The IRQ handling is not quite standard SFF behaviour so we cannot use the default lost interrupt handler */
Attachment:
signature.asc
Description: PGP signature