mode where the address is not translated.
 
 config CORESIGHT_SINK_TPIU
-       bool "Coresight generic TPIU driver"
+       tristate "Coresight generic TPIU driver"
        depends on CORESIGHT_LINKS_AND_SINKS
        help
          This enables support for the Trace Port Interface Unit driver,
          connected to an external host for use case capturing more traces than
          the on-board coresight memory can handle.
 
+         To compile this driver as a module, choose M here: the
+         module will be called coresight-tpiu.
+
 config CORESIGHT_SINK_ETBV10
        tristate "Coresight ETBv1.0 driver"
        depends on CORESIGHT_LINKS_AND_SINKS
 
        return PTR_ERR(drvdata->csdev);
 }
 
+static int __exit tpiu_remove(struct amba_device *adev)
+{
+       struct tpiu_drvdata *drvdata = dev_get_drvdata(&adev->dev);
+
+       coresight_unregister(drvdata->csdev);
+
+       return 0;
+}
+
 #ifdef CONFIG_PM
 static int tpiu_runtime_suspend(struct device *dev)
 {
        { 0, 0},
 };
 
+MODULE_DEVICE_TABLE(amba, tpiu_ids);
+
 static struct amba_driver tpiu_driver = {
        .drv = {
                .name   = "coresight-tpiu",
                .suppress_bind_attrs = true,
        },
        .probe          = tpiu_probe,
+       .remove         = tpiu_remove,
        .id_table       = tpiu_ids,
 };
-builtin_amba_driver(tpiu_driver);
+
+module_amba_driver(tpiu_driver);
+
+MODULE_AUTHOR("Pratik Patel <pratikp@codeaurora.org>");
+MODULE_AUTHOR("Mathieu Poirier <mathieu.poirier@linaro.org>");
+MODULE_DESCRIPTION("Arm CoreSight TPIU (Trace Port Interface Unit) driver");
+MODULE_LICENSE("GPL v2");