make to rtl8366_smi of binding use gpio_is_valid

SVN-Revision: 34816
This commit is contained in:
John Crispin 2012-12-21 13:47:14 +00:00
parent 4cca5cd4fd
commit 123343d424
1 changed files with 1 additions and 1 deletions

View File

@ -1379,7 +1379,7 @@ int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi)
int sck = of_get_named_gpio(pdev->dev.of_node, "gpio-sck", 0); int sck = of_get_named_gpio(pdev->dev.of_node, "gpio-sck", 0);
int sda = of_get_named_gpio(pdev->dev.of_node, "gpio-sda", 0); int sda = of_get_named_gpio(pdev->dev.of_node, "gpio-sda", 0);
if (!sck || !sda) { if (!gpio_is_valid(sck) || !gpio_is_valid(sda)) {
dev_err(&pdev->dev, "gpios missing in devictree\n"); dev_err(&pdev->dev, "gpios missing in devictree\n");
return -EINVAL; return -EINVAL;
} }