Skip to content

Commit

Permalink
dm: systemace: Drop the get_dev() function
Browse files Browse the repository at this point in the history
This function is implemented by the legacy block functions now. Drop it.

Signed-off-by: Simon Glass <[email protected]>
  • Loading branch information
sjg20 committed May 17, 2016
1 parent 4e7189d commit f6d000e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion disk/part.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const struct block_drvr block_drvr[] = {
},
#endif
#if defined(CONFIG_SYSTEMACE)
{ .name = "ace", .get_dev = systemace_get_dev, },
{ .name = "ace", },
#endif
#if defined(CONFIG_SANDBOX)
{ .name = "host", .get_dev = host_get_dev, },
Expand Down
14 changes: 3 additions & 11 deletions drivers/block/systemace.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ static void release_cf_lock(void)
ace_writew((val & 0xffff), 0x18);
}

#ifdef CONFIG_PARTITIONS
struct blk_desc *systemace_get_dev(int dev)
static int systemace_get_dev(int dev, struct blk_desc **descp)
{
/* The first time through this, the systemace_dev object is
not yet initialized. In that case, fill it in. */
Expand All @@ -127,14 +126,7 @@ struct blk_desc *systemace_get_dev(int dev)
part_init(&systemace_dev);

}

return &systemace_dev;
}
#endif

static int systemace_get_devp(int dev, struct blk_desc **descp)
{
*descp = systemace_get_dev(dev);
*descp = &systemace_dev;

return 0;
}
Expand Down Expand Up @@ -269,5 +261,5 @@ U_BOOT_LEGACY_BLK(systemace) = {
.if_typename = "ace",
.if_type = IF_TYPE_SYSTEMACE,
.max_devs = 1,
.get_dev = systemace_get_devp,
.get_dev = systemace_get_dev,
};
2 changes: 0 additions & 2 deletions include/part.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ struct blk_desc *blk_get_dev(const char *ifname, int dev);
* @return 0 if OK, other value for an error
*/
int mmc_select_hwpart(int dev_num, int hwpart);
struct blk_desc *systemace_get_dev(int dev);
struct blk_desc *mg_disk_get_dev(int dev);
struct blk_desc *host_get_dev(int dev);
int host_get_dev_err(int dev, struct blk_desc **blk_devp);
Expand Down Expand Up @@ -171,7 +170,6 @@ extern const struct block_drvr block_drvr[];
static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
{ return NULL; }
static inline int mmc_select_hwpart(int dev_num, int hwpart) { return -1; }
static inline struct blk_desc *systemace_get_dev(int dev) { return NULL; }
static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; }
static inline struct blk_desc *host_get_dev(int dev) { return NULL; }

Expand Down
7 changes: 0 additions & 7 deletions include/systemace.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,4 @@
* SPDX-License-Identifier: GPL-2.0+
*/

#ifdef CONFIG_SYSTEMACE

# include <part.h>

struct blk_desc *systemace_get_dev(int dev);

#endif /* CONFIG_SYSTEMACE */
#endif /* __SYSTEMACE_H */

0 comments on commit f6d000e

Please sign in to comment.