{0,}
};
-static char *dgap_driver_state_text[] = {
- "Driver Initialized",
- "Driver needs configuration load.",
- "Driver requested configuration from download daemon.",
- "Driver Ready."
-};
-
/*
* Default transparent print information.
*/
pr_info("%s, Digi International Part Number %s\n", DG_NAME, DG_PART);
- dgap_driver_state = DRIVER_NEED_CONFIG_LOAD;
-
rc = dgap_start();
if (rc)
return rc;
add_timer(&dgap_poll_timer);
- dgap_driver_state = DRIVER_NEED_CONFIG_LOAD;
-
return rc;
failed_device:
dgap_get_vpd(brd);
dgap_do_reset_board(brd);
- if ((fw_info[card_type].conf_name) &&
- (dgap_driver_state == DRIVER_NEED_CONFIG_LOAD)) {
+ if (fw_info[card_type].conf_name) {
ret = request_firmware(&fw, fw_info[card_type].conf_name,
&pdev->dev);
if (ret) {
if (dgap_parsefile(&dgap_config_buf, TRUE) != 0)
return -EINVAL;
-
- dgap_driver_state = -1;
}
ret = dgap_after_config_loaded(brd->boardnum);
}
static DRIVER_ATTR(pollcounter, S_IRUSR, dgap_driver_pollcounter_show, NULL);
-
-static ssize_t dgap_driver_state_show(struct device_driver *ddp, char *buf)
-{
- return snprintf(buf, PAGE_SIZE, "%s\n",
- dgap_driver_state_text[dgap_driver_state]);
-}
-static DRIVER_ATTR(state, S_IRUSR, dgap_driver_state_show, NULL);
-
static ssize_t dgap_driver_pollrate_show(struct device_driver *ddp, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%dms\n", dgap_poll_tick);
rc |= driver_create_file(driverfs, &driver_attr_maxboards);
rc |= driver_create_file(driverfs, &driver_attr_pollrate);
rc |= driver_create_file(driverfs, &driver_attr_pollcounter);
- rc |= driver_create_file(driverfs, &driver_attr_state);
return rc;
}
driver_remove_file(driverfs, &driver_attr_maxboards);
driver_remove_file(driverfs, &driver_attr_pollrate);
driver_remove_file(driverfs, &driver_attr_pollcounter);
- driver_remove_file(driverfs, &driver_attr_state);
}
static struct board_t *dgap_verify_board(struct device *p)