| .. | .. |
|---|
| 923 | 923 | if (!pinctrl->mux_log) |
|---|
| 924 | 924 | return -ENOMEM; |
|---|
| 925 | 925 | |
|---|
| 926 | | - log = pinctrl->mux_log; |
|---|
| 927 | 926 | for (i = 0; i < CYGNUS_NUM_IOMUX_REGS; i++) { |
|---|
| 928 | 927 | for (j = 0; j < CYGNUS_NUM_MUX_PER_REG; j++) { |
|---|
| 929 | 928 | log = &pinctrl->mux_log[i * CYGNUS_NUM_MUX_PER_REG |
|---|
| .. | .. |
|---|
| 941 | 940 | static int cygnus_pinmux_probe(struct platform_device *pdev) |
|---|
| 942 | 941 | { |
|---|
| 943 | 942 | struct cygnus_pinctrl *pinctrl; |
|---|
| 944 | | - struct resource *res; |
|---|
| 945 | 943 | int i, ret; |
|---|
| 946 | 944 | struct pinctrl_pin_desc *pins; |
|---|
| 947 | 945 | unsigned num_pins = ARRAY_SIZE(cygnus_pins); |
|---|
| .. | .. |
|---|
| 954 | 952 | platform_set_drvdata(pdev, pinctrl); |
|---|
| 955 | 953 | spin_lock_init(&pinctrl->lock); |
|---|
| 956 | 954 | |
|---|
| 957 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 958 | | - pinctrl->base0 = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 955 | + pinctrl->base0 = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 959 | 956 | if (IS_ERR(pinctrl->base0)) { |
|---|
| 960 | 957 | dev_err(&pdev->dev, "unable to map I/O space\n"); |
|---|
| 961 | 958 | return PTR_ERR(pinctrl->base0); |
|---|
| 962 | 959 | } |
|---|
| 963 | 960 | |
|---|
| 964 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
|---|
| 965 | | - pinctrl->base1 = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 961 | + pinctrl->base1 = devm_platform_ioremap_resource(pdev, 1); |
|---|
| 966 | 962 | if (IS_ERR(pinctrl->base1)) { |
|---|
| 967 | 963 | dev_err(&pdev->dev, "unable to map I/O space\n"); |
|---|
| 968 | 964 | return PTR_ERR(pinctrl->base1); |
|---|