mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-07 14:19:35 +00:00

After commit 0edb555a65
("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.
Convert all platform drivers below drivers/mtd to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20241007205803.444994-10-u.kleine-koenig@baylibre.com
38 lines
885 B
C
38 lines
885 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright © 2015 Broadcom Corporation
|
|
*/
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/module.h>
|
|
#include <linux/mod_devicetable.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
#include "brcmnand.h"
|
|
|
|
static const struct of_device_id brcmstb_nand_of_match[] = {
|
|
{ .compatible = "brcm,brcmnand" },
|
|
{},
|
|
};
|
|
MODULE_DEVICE_TABLE(of, brcmstb_nand_of_match);
|
|
|
|
static int brcmstb_nand_probe(struct platform_device *pdev)
|
|
{
|
|
return brcmnand_probe(pdev, NULL);
|
|
}
|
|
|
|
static struct platform_driver brcmstb_nand_driver = {
|
|
.probe = brcmstb_nand_probe,
|
|
.remove = brcmnand_remove,
|
|
.driver = {
|
|
.name = "brcmstb_nand",
|
|
.pm = &brcmnand_pm_ops,
|
|
.of_match_table = brcmstb_nand_of_match,
|
|
}
|
|
};
|
|
module_platform_driver(brcmstb_nand_driver);
|
|
|
|
MODULE_LICENSE("GPL v2");
|
|
MODULE_AUTHOR("Brian Norris");
|
|
MODULE_DESCRIPTION("NAND driver for Broadcom STB chips");
|