/* si470x_get_scratch_versions - gets the scratch page and version infos  */
static int si470x_get_scratch_page_versions(struct si470x_device *radio)
/* si470x_get_scratch_versions - gets the scratch page and version infos  */
static int si470x_get_scratch_page_versions(struct si470x_device *radio)
{
	unsigned char buf[SCRATCH_REPORT_SIZE];
	int retval;
	buf[0] = SCRATCH_REPORT;
	retval = si470x_get_report(radio, (void *) &buf, sizeof(buf));
	if (retval < 0)
		dev_warn(&radio->intf->dev, "si470x_get_scratch: "
			"si470x_get_report returned %d\n", retval);
	else {
		radio->software_version = buf[1];
		radio->hardware_version = buf[2];
	}
	return (retval < 0) ? -EINVAL : 0;
}