提交 8df82c13 编写于 作者: B Bhumika Goyal 提交者: Tejun Heo

libata: make ata_port_type const

Make this const as it is only stored in the const field of a device
structure. Make the declaration in header const too.

Structure found using Coccinelle and changes done by hand.
Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 e94f7914
...@@ -5824,7 +5824,7 @@ void ata_host_resume(struct ata_host *host) ...@@ -5824,7 +5824,7 @@ void ata_host_resume(struct ata_host *host)
} }
#endif #endif
struct device_type ata_port_type = { const struct device_type ata_port_type = {
.name = "ata_port", .name = "ata_port",
#ifdef CONFIG_PM #ifdef CONFIG_PM
.pm = &ata_port_pm_ops, .pm = &ata_port_pm_ops,
......
...@@ -51,7 +51,7 @@ extern int atapi_passthru16; ...@@ -51,7 +51,7 @@ extern int atapi_passthru16;
extern int libata_fua; extern int libata_fua;
extern int libata_noacpi; extern int libata_noacpi;
extern int libata_allow_tpm; extern int libata_allow_tpm;
extern struct device_type ata_port_type; extern const struct device_type ata_port_type;
extern struct ata_link *ata_dev_phys_link(struct ata_device *dev); extern struct ata_link *ata_dev_phys_link(struct ata_device *dev);
extern void ata_force_cbl(struct ata_port *ap); extern void ata_force_cbl(struct ata_port *ap);
extern u64 ata_tf_to_lba(const struct ata_taskfile *tf); extern u64 ata_tf_to_lba(const struct ata_taskfile *tf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册