This patch fix possible kernel crash if no platform data supplied.
We should not use platform data in this case, instead we will use
default values from private driver structure.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
} else
memcpy(&s->pdata, pdata, sizeof(struct sccnxp_pdata));
- if (pdata->poll_time_us) {
+ if (s->pdata.poll_time_us) {
dev_info(&pdev->dev, "Using poll mode, resolution %u usecs\n",
- pdata->poll_time_us);
+ s->pdata.poll_time_us);
s->poll = 1;
}