static int xxx_probe(struct platform_device *dev)
{
struct xxx_controller *con = the_controller;
...
platform_set_drvdata(dev, con);
...
}
static int xxx_remove(struct platform_device *dev)
{
strcut xxx_controller *con = platfrom_get_drvdata(dev);
...
}