return retval;
}
-static const struct greybus_module_id fake_gb_id =
- { GREYBUS_DEVICE(0x42, 0x42) };
+static const struct greybus_module_id fake_gb_id = {
+ GREYBUS_DEVICE(0x42, 0x42)
+};
static int create_function(struct greybus_device *gdev,
struct greybus_descriptor *desc, int desc_size)
static void gpio_set(struct gpio_chip *gpio, unsigned nr, int val)
{
// FIXME - do something there
- return;
}
int gb_gpio_probe(struct greybus_device *gdev,
gpio->ngpio = 42; // FIXME!!!
gpio->can_sleep = false; // FIXME!!!
- gdev->gb_gpio_dev= gb_gpio;
+ gdev->gb_gpio_dev = gb_gpio;
retval = gpiochip_add(gpio);
if (retval) {
char *buf)
{
struct greybus_device *gdev = to_greybus_device(dev);
+
return sprintf(buf, "%s",
greybus_string(gdev, gdev->module_id.vendor_stringid));
}
char *buf)
{
struct greybus_device *gdev = to_greybus_device(dev);
+
return sprintf(buf, "%s",
greybus_string(gdev, gdev->module_id.product_stringid));
}
struct device_attribute *attr, char *buf)
{
struct greybus_device *gdev = to_greybus_device(dev);
+
return sprintf(buf, "%llX\n",
(unsigned long long)gdev->serial_number.serial_number);
}
if (copy_to_user(info, &tmp, sizeof(tmp)))
return -EFAULT;
- else
- return 0;
+ return 0;
}
static int set_serial_info(struct gb_tty *gb_tty,