Re: [PATCH v9 2/2] spi: loongson: add bus driver for the loongson spi controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





在 2023/5/11 下午3:18, zhuyinbo 写道:


在 2023/5/8 下午11:04, andy.shevchenko@xxxxxxxxx 写道:


+config SPI_LOONGSON_CORE
+    tristate "Loongson SPI Controller Core Driver Support"

Does it need to be visible to the user?



I try to set it invisible that by removing the SPI_LOONGSON_CORE Kconfig
or removing "tristate "Loongson SPI Controller Core Driver Support" that
will cause spi-core driver doesn't be compiled or compiled fail issue,
so I will still set it visible to the user.


+    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+    if (res == NULL) {

Why not using devm_platform_ioremap_resource()?
okay, I will use it.

+        dev_err(dev, "cannot get io resource memory\n");
+        return -ENOENT;

    return dev_err_probe();


It seems that there is no need to print memory log when use
devm_platform_ioremap_resource because this function had contained
the this memory log print thus I will return PTR_ERR(reg_base).

        reg_base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(reg_base))
                return PTR_ERR(reg_base);

Thanks.







[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux