Skip to content

Commit 0e8bb66

Browse files
Minghao ChiUlf Hansson
authored andcommitted
mmc: core: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220425105339.3515368-1-chi.minghao@zte.com.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 8987798 commit 0e8bb66

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mmc/core/block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static struct attribute *mmc_disk_attrs[] = {
330330
static umode_t mmc_disk_attrs_is_visible(struct kobject *kobj,
331331
struct attribute *a, int n)
332332
{
333-
struct device *dev = container_of(kobj, struct device, kobj);
333+
struct device *dev = kobj_to_dev(kobj);
334334
struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev));
335335
umode_t mode = a->mode;
336336

0 commit comments

Comments
 (0)