public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: make ata_port_operations const
@ 2017-08-07 10:32 Bhumika Goyal
  2017-08-07 15:07 ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Bhumika Goyal @ 2017-08-07 10:32 UTC (permalink / raw)
  To: julia.lawall, b.zolnierkie, tj, linux-ide, linux-kernel; +Cc: Bhumika Goyal

Make ata_port_operations structures const as it is only stored in the
inherits field of an ata_port_operations structure. Therefore make it
const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/ata/pata_sis.c | 2 +-
 drivers/ata/sata_via.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 626f989..24614d2 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -549,7 +549,7 @@ static unsigned long sis_133_mode_filter(struct ata_device *adev, unsigned long
 	.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,
 };
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 93b8d78..83ba848 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -129,7 +129,7 @@ struct svia_priv {
 	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,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-08  8:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 10:32 [PATCH] ata: make ata_port_operations const Bhumika Goyal
2017-08-07 15:07 ` Tejun Heo
2017-08-07 15:24   ` Bhumika Goyal
2017-08-07 16:29     ` Tejun Heo
2017-08-07 16:34       ` Joe Perches
2017-08-08  8:11         ` Bhumika Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox