hw/sd: Move proto_name to SDProto structure

Introduce a new structure to hold the bus protocol specific
fields: SDProto. The first field is the protocol name.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210624142209.1193073-4-f4bug@amsat.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
Philippe Mathieu-Daudé 2022-05-30 19:09:27 +02:00 committed by Cédric Le Goater
parent 94ef3041d2
commit 1b4a234278
2 changed files with 29 additions and 8 deletions

View file

@ -124,6 +124,8 @@ struct SDCardClass {
void (*enable)(SDState *sd, bool enable);
bool (*get_inserted)(SDState *sd);
bool (*get_readonly)(SDState *sd);
const struct SDProto *proto;
};
#define TYPE_SD_BUS "sd-bus"