Skip to content

Commit

Permalink
libata: finally use __initconst in ata_parse_force_one()
Browse files Browse the repository at this point in the history
Just six days after this FIXME was added seven years ago, Sam Ravnborg
added the missing feature (37c514e "Add missing init section
definitions"), though it ended up being called __initconst.

Let's use it; better late than never.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Rasmus Villemoes authored and Tejun Heo committed Jun 10, 2015
1 parent a73ed35 commit 0f5f264
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
@@ -6456,12 +6456,7 @@ static int __init ata_parse_force_one(char **cur,
struct ata_force_ent *force_ent,
const char **reason)
{
/* FIXME: Currently, there's no way to tag init const data and
* using __initdata causes build failure on some versions of
* gcc. Once __initdataconst is implemented, add const to the
* following structure.
*/
static struct ata_force_param force_tbl[] __initdata = {
static const struct ata_force_param force_tbl[] __initconst = {
{ "40c", .cbl = ATA_CBL_PATA40 },
{ "80c", .cbl = ATA_CBL_PATA80 },
{ "short40c", .cbl = ATA_CBL_PATA40_SHORT },

0 comments on commit 0f5f264

Please sign in to comment.